Skip to content

fix: support IPv6 BGP peerings#1240

Open
apalrd wants to merge 4 commits intoellanetworks:mainfrom
apalrd:apalrd-bgp
Open

fix: support IPv6 BGP peerings#1240
apalrd wants to merge 4 commits intoellanetworks:mainfrom
apalrd:apalrd-bgp

Conversation

@apalrd
Copy link
Copy Markdown

@apalrd apalrd commented Apr 9, 2026

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:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that validate the behaviour of the software
  • I validated that new and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@apalrd apalrd requested a review from gruyaume as a code owner April 9, 2026 16:37
@apalrd apalrd changed the title Support IPv6 BGP Peerings fix: support IPv6 BGP peerings Apr 9, 2026
Copy link
Copy Markdown
Collaborator

@ghislainbourgeois ghislainbourgeois left a comment

Choose a reason for hiding this comment

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

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.

Comment thread ui/src/components/CreateBGPPeerModal.tsx
@apalrd
Copy link
Copy Markdown
Author

apalrd commented Apr 9, 2026

Updated both

@ghislainbourgeois ghislainbourgeois dismissed gruyaume’s stale review April 9, 2026 22:25

Comment was addressed

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.

3 participants