Skip to content

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
stable/10.3from
mergify/bp/stable/10.3/pr-22295
Closed

bgpd: skip peers not activated for AFI/SAFI in bgp_gr_check_all_eors() (backport #22295)#22306
mergify[bot] wants to merge 1 commit into
stable/10.3from
mergify/bp/stable/10.3/pr-22295

Conversation

@mergify

@mergify mergify Bot commented Jun 10, 2026

Copy link
Copy Markdown

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).

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
@mergify mergify Bot added the conflicts label Jun 10, 2026
@mergify

mergify Bot commented Jun 10, 2026

Copy link
Copy Markdown
Author

Cherry-pick of e6b40ba has failed:

On branch mergify/bp/stable/10.3/pr-22295
Your branch is up to date with 'origin/stable/10.3'.

You are currently cherry-picking commit e6b40baa5.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   bgpd/bgp_fsm.c

no changes added to commit (use "git add" and/or "git commit -a")

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

@greptile-apps

greptile-apps Bot commented Jun 10, 2026

Copy link
Copy Markdown

Target branch is not in the allowed branches list.

@frrbot frrbot Bot added the bgp label Jun 10, 2026
@ton31337 ton31337 closed this Jun 10, 2026
@ton31337 ton31337 deleted the mergify/bp/stable/10.3/pr-22295 branch June 10, 2026 06:54
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