diff options
| author | Louis Scalbert <louis.scalbert@6wind.com> | 2024-08-23 16:05:45 +0200 |
|---|---|---|
| committer | Louis Scalbert <louis.scalbert@6wind.com> | 2024-08-23 17:34:13 +0200 |
| commit | af54901405474b0623bda1899424ec18a3240c71 (patch) | |
| tree | de34f361aad9b883465faccdd995c4267ccccdef /nhrpd | |
| parent | 83a60e7e20449b04a996ba53bd43c1659b6fbc0f (diff) | |
nhrpd: fix sending /32 shortcut
The remote spoke always sends a 32 prefix length to a shortcut request.
In the example, the remote spoke as the IP address 192.168.2.1/24.
spoke1# sh ip nhrp shortcut
Type Prefix Via Identity
dynamic 192.168.2.1/32 10.255.255.2
Do not deal with local routes in nhrpd. Now:
spoke1# sh ip nhrp shortcut
Type Prefix Via Identity
dynamic 192.168.2.0/24 10.255.255.2
Fixes: d4aa24ba7d ("*: Introduce Local Host Routes to FRR")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'nhrpd')
| -rw-r--r-- | nhrpd/nhrp_route.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nhrpd/nhrp_route.c b/nhrpd/nhrp_route.c index fd9090bd6e..7adc4a6399 100644 --- a/nhrpd/nhrp_route.c +++ b/nhrpd/nhrp_route.c @@ -219,6 +219,10 @@ int nhrp_route_read(ZAPI_CALLBACK_ARGS) if (api.type == ZEBRA_ROUTE_NHRP) return 0; + /* ignore local routes */ + if (api.type == ZEBRA_ROUTE_LOCAL) + return 0; + sockunion_family(&nexthop_addr) = AF_UNSPEC; if (CHECK_FLAG(api.message, ZAPI_MESSAGE_NEXTHOP)) { api_nh = &api.nexthops[0]; |
