Repository navigation
Conversation
1db334a to
f3b9478
Compare
4bd61eb to
e91a1f5
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Shared parsing state can apply inbound ADD-PATH settings to outbound traffic, causing incorrect decoding.
1 open issue
What changed in this PR
Updates BMP capability negotiation to account for traffic direction rather than intersecting identical capabilities.
Changes:
- Matches complementary ADD-PATH send/receive support by address family.
- Selects receiver label limits while preserving first duplicates and single-label defaults.
- Adds regression coverage for directional and asymmetric capabilities.
| File | Description |
|---|---|
| crates/bmp-pkt/src/codec.rs | Implements directional negotiation and regression tests. |
Review effort: Balanced
e91a1f5 to
c0178f3
Compare
c0178f3 to
2d7045f
Compare
b16e204 to
a36c8c8
Compare
a36c8c8 to
9726190
Compare
rodonile
left a comment
There was a problem hiding this comment.
Last nits, then ready to merge from my side
2ba5119 to
1e280e7
Compare
1e280e7 to
ba93219
Compare
25ca4aa to
acd5831
Compare
acd5831 to
8c46890
Compare
Decode one Peer Up followed by inbound and outbound Route Monitoring messages through one codec in BMP v3 and v4. Cover asymmetric ADD-PATH support, both BGP-ID aliases, and withdrawn and announced NLRI. Both regressions fail before session negotiation and direction-aware parsing are implemented in the following steps.
Introduce AddPathMap with AddPathAddressFamily values indexed by address family. Keep send and receive flags in one map and expose directional lookups without allocating temporary maps. Preserve receive-side constructor input and adapt NLRI readers and storage tests. Leave BMP negotiation and direction selection for the next steps.
Match complementary send and receive support by address family. Store both negotiated directions under both BGP-ID aliases and clear stale ADD-PATH state on later Peer Up while retaining Loc-RIB families.
Select send or receive support using each Route Monitoring header. Keep v4 stateless overrides message-local and delegate capability updates to a borrowed ADD-PATH helper.
Extend the single-session regressions with IPv6 MP_REACH/MP_UNREACH, v4 stateless overrides, and later Peer Up capability removal. Verify both lookup aliases and ensure overrides do not leak across messages.
@rodonile: For loc-rib this negotiation should be skipped, it's enough to have capability present for mandating when add-path should be present: https://datatracker.ietf.org/doc/html/rfc9069#section-5.2
use helper functions to make the long tests clearer use itertools combinations instead of 5 nested for loops
8c46890 to
ec348cc
Compare
|
Had to rebase since #69 is merged first |
ec348cc to
463dd70
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
An active moderate finding remains because Route Mirroring can derive the wrong ADD-PATH parsing direction and misparse mirrored updates when negotiated send/receive bits differ.
No open issues 🎉
2 resolved since last review
Review effort: Lite


Match ADD-PATH address families and combine local send/receive support with the complementary remote direction instead of intersecting identical capabilities.
Add regression coverage for directional combinations of add-path
Fixes #67