Skip to content

bgpd: Prevent unnecessary re-install of routes (backport #19788)#20537

Merged
Jafaral merged 1 commit intostable/10.5from
mergify/bp/stable/10.5/pr-19788
Jan 21, 2026
Merged

bgpd: Prevent unnecessary re-install of routes (backport #19788)#20537
Jafaral merged 1 commit intostable/10.5from
mergify/bp/stable/10.5/pr-19788

Conversation

@mergify
Copy link

@mergify mergify bot commented Jan 20, 2026

There is this sequence of events that is happening:

a) BGP registers for a nexthop resolution for address A b)
c) Something else in the system requests for the same nexthop resolution tracking for A
d) Zebra wakes up and decides to send a update to BGP about the nexthop, even when nothing has happened. e) BGP decides that the nexthop has not changed but goes ahead and reinstalls everything again anyways.

Let's modify BGP to be a bit smarter here. It already knows that the nexthop hasn't changed, there is no need to run bgp_process on each route that is using the BNC. Let's stop this from happening.

This is only 1/2 the fix. I want to protect BGP from zebra but I also want zebra to not send the update to BGP in this case. That change is going to come in a different set of commits because it's a bit larger of a problem and will need a bit more work.


This is an automatic backport of pull request #19788 done by Mergify.

There is this sequence of events that is happening:

a) BGP registers for a nexthop resolution for address A
b) <time passes and BGP comes fully up>
c) Something else in the system requests for the same
nexthop resolution tracking for A
d) Zebra wakes up and decides to send a update to BGP
about the nexthop, even when nothing has happened.
e) BGP decides that the nexthop has not changed but goes
ahead and reinstalls everything again anyways.

Let's modify BGP to be a bit smarter here.  It already
knows that the nexthop hasn't changed, there is no need
to run bgp_process on each route that is using the BNC.
Let's stop this from happening.

This is only 1/2 the fix.  I want to protect BGP from zebra
but I also want zebra to not send the update to BGP in this case.
That change is going to come in a different set of commits because
it's a bit larger of a problem and will need a bit more work.

Signed-off-by: Donald Sharp <[email protected]>
(cherry picked from commit 8dcd0a6)
@frrbot frrbot bot added the bgp label Jan 20, 2026
@Jafaral Jafaral merged commit dfc9e28 into stable/10.5 Jan 21, 2026
21 checks passed
@Jafaral Jafaral deleted the mergify/bp/stable/10.5/pr-19788 branch January 27, 2026 16:53
@mattiaswal mattiaswal mentioned this pull request Mar 18, 2026
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants