fix: support IPv6 BGP peerings#1240
Open
apalrd wants to merge 4 commits intoellanetworks:mainfrom
Open
Conversation
ghislainbourgeois
requested changes
Apr 9, 2026
Collaborator
ghislainbourgeois
left a comment
There was a problem hiding this comment.
Thank you very much for this PR!
Regarding the test, if you can look into internal/api/server/api_bgp_test.go, there is a block at line 1010 that checks that v6 is rejected, can you remove that block so that the tests pass?
Don't worry about adding new tests, I am working on IPv6 features also, and I can add the missing tests later.
gruyaume
previously requested changes
Apr 9, 2026
Author
|
Updated both |
6 tasks
ghislainbourgeois
approved these changes
Apr 9, 2026
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.
Description
Updates BGP dialog / API to support v4 and v6 peers. Note that the address family of the BGP session has no relation to the data sent over BGP, the BGP session still only supports ipv4 afi.
The regex should properly support v4, v6, v6 link-local with scope (fe80::1%eth0), v6-mapped-v4 (::ffff:192.168.1.1), and v6-translated-v4 (6f:ff9b::192.168.1.1).
I tested this with a v6 peer (BIRD3) and the session came up and exchanged routes without issues. I have not updated test cases, I'm not a regular Go dev so I'm not familiar enough with them.
Checklist: