Skip to content

fix(bgp-pkt): validate ADD-PATH and Multiple Labels capabilities - #146

Draft
mxyns wants to merge 1 commit into
mainfrom
fix/bgp-capability-validation
Draft

mxyns wants to merge 1 commit into
mainfrom
fix/bgp-capability-validation

Conversation

@mxyns

@mxyns mxyns commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Require 1–63 entries for ADD-PATH and Multiple Labels capabilities across construction, wire decoding, and Serde.
  • Preserve raw Multiple Labels counts of 0 and 1 in serialization and skip those entries when applying or negotiating label limits.
  • Cover length boundaries and invalid-count handling with regression tests.

Verification

cargo test --offline -p netcalyx-bgp-pkt -p netcalyx-bmp-pkt --all-features --features netcalyx-iana/fuzz --lib

All 362 tests passed.

Remaining RFC gaps

ADD-PATH Send/Receive value 0 is still accepted and can be emitted. Raw Multiple Labels serialization can emit counts of 0 and 1.

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.

1 participant