fix(api): Widen BGPRouter nodeID to the full 16-bit uSID field - #24
Merged
Merged
Conversation
BGPRouterSpec.NodeID was declared an 8-bit slot -- kubebuilder Maximum=254, with a doc comment reading "Values 0 and 255 are reserved". The uSID carrier format it encodes has always treated Node-ID as a 16-bit field at bits 49-64; galactic's uformat.NodeIDMin/NodeIDMax are 0x0001-0xDFFF (0xE000-0xFFFF is the LIB, Function space rather than Node-ID space). The CRD was simply never updated when the field widened, so the API has been rejecting three quarters of the assignable range. This blocks any allocation scheme that partitions Node-ID into sub-fields. Splitting it into a 4-bit service selector plus a 12-bit node index -- so one node can hold a tenant-delivery identity, a NAT egress shard and an edge gateway without the three colliding on the /64 that ownership is decided at -- puts the very first delivery Node-ID at 0x1001, or 4097. Against the old bound every such router failed admission outright: The BGPRouter "galactic-router" is invalid: spec.nodeID: Invalid value: 4097: spec.nodeID in body should be less than or equal to 254 Raise Maximum to 57343 (0xDFFF) to match uformat, and rewrite the doc comment to name the field's real width and the ranges the carrier format reserves. Minimum stays 1: Node-ID 0x0000 is invalid. The change is purely permissive, so no existing BGPRouter becomes invalid under it. Regenerated config/crd/ and docs/api/ via task generate. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ecv
approved these changes
Sep 21, 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.
Summary
BGPRouter's
nodeIDwas capped at 254, an 8-bit bound the uSID carrier format outgrew long ago — Node-ID is a 16-bit field spanning 0x0001–0xDFFF, with 0xE000 and above reserved as Function space. Any allocation scheme that partitions Node-ID into sub-fields lands above 254 and was rejected outright at admission. The maximum now matches the carrier format, and the field's doc comment names its real width and reserved ranges.The change is purely permissive, so every BGPRouter valid today stays valid.
Test plan
🤖 Generated with Claude Code