bgpd: Prevent unnecessary re-install of routes (backport #19788)#20537
Merged
Jafaral merged 1 commit intostable/10.5from Jan 21, 2026
Merged
bgpd: Prevent unnecessary re-install of routes (backport #19788)#20537Jafaral merged 1 commit intostable/10.5from
Jafaral merged 1 commit intostable/10.5from
Conversation
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.