summaryrefslogtreecommitdiffstats
path: root/babeld
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2024-08-22 16:24:42 +0200
committerDonald Sharp <sharpd@nvidia.com>2024-08-22 16:24:42 +0200
commit63e2c092a363bf6ff8ca434d1f68bc29fa5b4dac (patch)
tree08a6731257929794e86679732f134789122f5b79 /babeld
parentbabeld: Send the route's metric down to zebra. (diff)
downloadfrr-63e2c092a363bf6ff8ca434d1f68bc29fa5b4dac.tar.xz
frr-63e2c092a363bf6ff8ca434d1f68bc29fa5b4dac.zip
babeld: Do not remove route when replacing
When sending down a babel route do not remove then add it back. Just send down the change. This change will not cause packets to be dropped now. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'babeld')
-rw-r--r--babeld/kernel.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/babeld/kernel.c b/babeld/kernel.c
index aed6dc9c4..4957b04e7 100644
--- a/babeld/kernel.c
+++ b/babeld/kernel.c
@@ -92,13 +92,9 @@ kernel_route(enum babel_kernel_routes operation, const unsigned char *pref,
case ROUTE_MODIFY:
if(newmetric == metric && memcmp(newgate, gate, 16) == 0 &&
newifindex == ifindex)
- return 0;
- debugf(BABEL_DEBUG_ROUTE, "Modify route: delete old; add new.");
- rc = zebra_route(0, family, pref, plen, gate, ifindex, metric);
- if (rc < 0)
- return -1;
+ return 0;
- rc = zebra_route(1, family, pref, plen, newgate, newifindex,
+ rc = zebra_route(1, family, pref, plen, newgate, newifindex,
newmetric);
return rc;
}