bgpd: skip peers not activated for AFI/SAFI in bgp_gr_check_all_eors() (backport #22295)#22306
Closed
mergify[bot] wants to merge 1 commit into
Closed
bgpd: skip peers not activated for AFI/SAFI in bgp_gr_check_all_eors() (backport #22295)#22306mergify[bot] wants to merge 1 commit into
mergify[bot] wants to merge 1 commit into
Conversation
bgp_gr_check_all_eors() walks every peer in bgp->peer and -- for any peer with PEER_STATUS_GR_WAIT_EOR set but no PEER_STATUS_EOR_RECEIVED -- splits into two code paths based on bgp->gr_multihop_peer_exists. An existing !afc check filtered out peers that do not have this AFI/SAFI configured/activated, but it sat after the no-multihop-mix branch's early 'return false' -- so it was only ever reached when gr_multihop_peer_exists was true. The no-multihop-mix branch instead returned false on the first peer that lacked EOR_RECEIVED -- including peers that have no activated AF at all and are therefore physically incapable of ever sending an EOR for the AFI/SAFI in question. In topologies where the BGP config defines neighbors that are never 'activate'd under any address family, this caused bgp_gr_check_all_eors() to return FALSE on every incoming EOR receipt, permanently blocking the GR fast-cancel path and forcing the deferral to always run to the select-defer-time safety-timer expiry. Move the !afc check above the branch split so both branches see it; the post-split copy becomes unreachable and is removed. Signed-off-by: Shashanka K S <shashankak@nvidia.com> (cherry picked from commit e6b40ba) # Conflicts: # bgpd/bgp_fsm.c
Author
|
Cherry-pick of e6b40ba has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
|
Target branch is not in the allowed branches list. |
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.
bgp_gr_check_all_eors() walks every peer in bgp->peer and -- for any peer with PEER_STATUS_GR_WAIT_EOR set but no PEER_STATUS_EOR_RECEIVED -- splits into two code paths based on bgp->gr_multihop_peer_exists.
An existing !afc check filtered out peers that do not have this AFI/SAFI configured/activated, but it sat after the no-multihop-mix branch's early 'return false' -- so it was only ever reached when gr_multihop_peer_exists was true. The no-multihop-mix branch instead returned false on the first peer that lacked EOR_RECEIVED -- including peers that have no activated AF at all and are therefore physically incapable of ever sending an EOR for the AFI/SAFI in question.
In topologies where the BGP config defines neighbors that are never 'activate'd under any address family, this caused bgp_gr_check_all_eors() to return FALSE on every incoming EOR receipt, permanently blocking the GR fast-cancel path and forcing the deferral to always run to the select-defer-time safety-timer expiry.
Move the !afc check above the branch split so both branches see it; the post-split copy becomes unreachable and is removed.
This is an automatic backport of pull request #22295 done by [Mergify](https://mergify.com).