Skip to content

Commit

Permalink
babeld: Do not remove route when replacing
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
donaldsharp committed Aug 22, 2024
1 parent b4c88ab commit 63e2c09
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions babeld/kernel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 63e2c09

Please sign in to comment.