Skip to content

fix(srv6): Add missing SRv6 SID Structure sub-sub-TLV - #299

Merged
privateip merged 1 commit into
mainfrom
fix/srv6-sid-structure-sub-sub-tlv
Aug 7, 2026
Merged

fix(srv6): Add missing SRv6 SID Structure sub-sub-TLV#299
privateip merged 1 commit into
mainfrom
fix/srv6-sid-structure-sub-sub-tlv

Conversation

@privateip

Copy link
Copy Markdown
Contributor

Summary

The BGP Prefix-SID attribute Galactic advertises for EVPN Type 5 paths carries the destination SID but never described its internal layout. RFC 9252 requires an SRv6 SID Structure Sub-Sub-TLV alongside the SID so receivers know how to interpret it — Galactic's uFMT 48+16 layout (48-bit Block, 16-bit Node-ID, 4-bit Function, 12-bit Argument, no transposition) was never signaled on the wire. Impact was low, since every Galactic node parses SIDs via fixed offsets rather than this TLV, but a spec-compliant third-party EVPN/SRv6 receiver would have been missing the structure description entirely.

prefixSIDAttr now builds the sub-sub-TLV from uformat's existing bit-width constants instead of hardcoding new values, so the wire encoding and the eBPF datapath's own bit layout can't silently drift apart.

L2 (uEnd.DT2) and the receive-side path are unaffected — out of scope until L2/EVI support lands.

Found via a compliance check against datum-cloud/enhancements's architecture/design/network/addressing/srv6.md, §"RFC 9252 SRv6 Service Encoding" — there's no tracked issue for this gap.

Test plan

  • task lint
  • task test:unit — covers a new round-trip test that serializes the attribute and decodes it back via GoBGP's own DecodeFromBytes, asserting on the sub-sub-TLV fields
  • task test:e2e — not run; the e2e suite doesn't exercise real BGP path exchange between two GoBGP instances, so it wouldn't observe this attribute on the wire

The BGP Prefix-SID attribute Galactic advertises for EVPN Type 5 paths
carried the destination SID but never described its internal layout.
RFC 9252 requires an SRv6 SID Structure Sub-Sub-TLV alongside the SID
so receivers know how to interpret it — Galactic's uFMT 48+16 layout
(48-bit Block, 16-bit Node-ID, 4-bit Function, 12-bit Argument, no
transposition) was never signaled on the wire.

prefixSIDAttr now builds that sub-sub-TLV from uformat's existing
bit-width constants rather than hardcoding new values, keeping the
wire encoding and the eBPF datapath's own bit layout from drifting
apart. A new round-trip test serializes the attribute and decodes it
back through GoBGP's own DecodeFromBytes to assert on the sub-sub-TLV
fields.

L2 (uEnd.DT2) and the receive side (nodes still parse SIDs via
uformat's fixed offsets, not this TLV) are unaffected — out of scope
until L2/EVI support lands.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@privateip
privateip requested a review from a team as a code owner August 7, 2026 02:08
@privateip
privateip requested a review from ecv August 7, 2026 02:08
@privateip
privateip merged commit e96fa3c into main Aug 7, 2026
10 checks passed
@privateip
privateip deleted the fix/srv6-sid-structure-sub-sub-tlv branch August 7, 2026 02:17
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