Skip to content

bgp: add labeled unicast address families (RFC 8277) - #134

Open
gusbourg wants to merge 7 commits into
holo-routing:masterfrom
gusbourg:bgp-labeled-unicast-pr
Open

gusbourg wants to merge 7 commits into
holo-routing:masterfrom
gusbourg:bgp-labeled-unicast-pr

Conversation

@gusbourg

@gusbourg gusbourg commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Adds BGP labeled unicast (RFC 8277) for IPv4 and IPv6:

  • ipv4-labeled-unicast / ipv6-labeled-unicast AFI/SAFI on the generalized AddressFamily.
  • Labeled NLRI codec (label + prefix; no RD).
  • Label allocation/programming.
  • Packet round-trip test + a labeled_unicast conformance topology.

Stacked on #132 (AddressFamily Prefix key) — the AddressFamily commits drop out of this diff once #132 merges.

🤖 Generated with Claude Code

gusbourg and others added 7 commits July 5, 2026 10:41
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add an AddressFamily::Prefix associated type for NLRI/RIB keys while keeping policy, northbound, and IBus boundaries on normal IP network values. IPv4 and IPv6 unicast use identity conversions, preserving current behavior.

Switch BGP RIB prefix storage from PrefixMap to BTreeMap so future address families are not constrained by prefix_trie's primitive-integer key representation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add a BGP conformance topology that negotiates IPv4 labeled-unicast, imports a labeled route, and verifies both the IP route label stack and MPLS label programming outputs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Extend the labeled-unicast replay to negotiate IPv6 labeled-unicast, import a labeled IPv6 route, track its IPv6 next hop, and assert both IP route label stack and MPLS label programming outputs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

2 participants