Skip to content

Fix: Configure AFI/SAFI Always#1994

Merged
aauren merged 2 commits intomasterfrom
fix/configure_afi_safis_always
Jan 26, 2026
Merged

Fix: Configure AFI/SAFI Always#1994
aauren merged 2 commits intomasterfrom
fix/configure_afi_safis_always

Conversation

@aauren
Copy link
Copy Markdown
Collaborator

@aauren aauren commented Jan 25, 2026

Replaces: #1993 - Fixes: #1992

Thanks to @rkojedzinszky for finding this bug and providing the initial fix in #1993.

I made this PR because I wanted to unify the BGP AFI/SAFI configuration a bit more between the two sets of peering functions. Additionally, I also wanted to add unit testing to ensure that we don't get this issue again in the future via regression.

This also retains the previous functionality a bit better where the graceful restart property is not set at all rather than set with Enabled = false. The functionality should be the same, but may not be completely equivalent.

Changes AFI SAFI configuration to:
* Use consolidated logic for AFI SAFI configuration for both internal
  peers and external peers
* Configure AFI SAFI regardless of GracefulRestart enablement
  * This is important because by default GoBGP only configures a default
    AFI SAFI configuration for the address family of its configured
    peering IP. Which means that previously dual-stack configurations
    that did not enable GracefulRestart would not work (see: #1992)
NeighborAddress: "192.168.1.1",
PeerAsn: 65000,
},
AfiSafis: nil,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Did you just add the nil here just to be more explicit? Feel free to ignore, I figured that with the test name and the comment explaining this, it's probably fine to not explicitly set it since it's going to be nil anyway.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I figured someone looking for the name of the test would look around for a nil reference.

@aauren aauren merged commit 790d53e into master Jan 26, 2026
7 checks passed
@aauren aauren deleted the fix/configure_afi_safis_always branch January 26, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IPv6 Dual-stack mesh pod routing works only when bgp graceful restart is enabled

2 participants