Repository navigation
Parse IPv6 next hops for IPv4 MP_REACH NLRI - #5
Merged
Merged
Conversation
nuclearcat
added a commit
to nuclearcat/netom
that referenced
this pull request
Nov 16, 2026
Keep 16-byte global and 32-byte global/link-local IPv6 next hops in MP_REACH for IPv4 routes on the live rebuild and aggregated dump paths. Advertise the matching Extended Next Hop tuple in both synthesized OPENs, account for its headers when splitting dumps, and reserve room for the OPEN optional-parameter header when adding descriptive capabilities. Pin the routecore parser fix from FastNetMon/routecore#5 in Cargo.lock. Keep capability warnings limited to tuples the output cannot reproduce. Extend synthetic regressions and BMP end-to-end coverage for both IPv6 next-hop forms, including ADD-PATH and reconnect dumps. Related to FastNetMon#22.
nuclearcat
added a commit
to nuclearcat/netom
that referenced
this pull request
Nov 17, 2026
Keep 16-byte global and 32-byte global/link-local IPv6 next hops in MP_REACH for IPv4 routes on the live rebuild and aggregated dump paths. Advertise the matching Extended Next Hop tuple in both synthesized OPENs for peers that advertised it (and for MRT sources, which carry no OPEN), and account for its headers when splitting dumps. Reserve room for the OPEN optional-parameter header when adding descriptive and passed-through capabilities, so the Optional Parameters Length octet can no longer wrap. Pin the routecore parser fix from FastNetMon/routecore#5 in Cargo.lock. Keep capability warnings limited to tuples the output cannot reproduce, sharing the supported tuple with the encoder. Extend synthetic regressions and BMP end-to-end coverage for both IPv6 next-hop forms, including ADD-PATH and reconnect dumps. Related to FastNetMon#22. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
nuclearcat
force-pushed
the
fix/ipv4-ipv6-next-hop
branch
from
November 17, 2026 09:49
7b26135 to
057edde
Compare
Accept the 16-byte IPv6 and 32-byte global/link-local next-hop forms for IPv4 unicast, multicast and labeled unicast, and the RD-prefixed 24- and 48-byte forms for VPN-IPv4, as specified by RFC 8950. Retain conventional IPv4 next hops. Only accept these when the Extended Next Hop Encoding capability was negotiated for the family: SessionConfig gains a strict family set, filled from the capabilities both peers advertised when it is made from a NegotiatedConfig. Standalone configs stay permissive for file parsing. Add the OPEN helpers to advertise and read the capability, and let the FSM advertise it via BgpConfig::extended_next_hop. Share the length handling between address families. This also accepts the 32-byte form for IPv6 multicast and labeled unicast and the 48-byte form for VPN-IPv6. The second address of a 32-byte next hop is only kept if it is link-local; for the 48-byte form only the RD and global address are kept. Return NextHop::Unicast from NextHop::new for the multicast families, as parsing does, so that a builder's default next hop round-trips. Make set_nexthop_ll_addr work on builders for IPv4 families instead of panicking, and return an error for next hops without a link-local part. Cover next-hop length boundaries, truncated inputs, capability enforcement, MP_REACH attribute ownership and UPDATE builder round trips for unicast, multicast and labeled unicast, including ADD-PATH path IDs. Related to FastNetMon/netom#22.
nuclearcat
force-pushed
the
fix/ipv4-ipv6-next-hop
branch
from
November 17, 2026 11:50
057edde to
5cb8563
Compare
nuclearcat
added a commit
to nuclearcat/netom
that referenced
this pull request
Nov 17, 2026
Keep 16-byte global and 32-byte global/link-local IPv6 next hops in MP_REACH for IPv4 routes on the live rebuild and aggregated dump paths. Advertise the matching Extended Next Hop tuple in both synthesized OPENs when the receiving side advertised it (and for MRT sources with no OPEN), and account for its headers when splitting dumps. Select mixed UPDATE next hops by both prefix and ADD-PATH identifier, including during dump grouping and emission. Use the local OPEN for inbound Extended Next Hop support and the remote OPEN for outbound support. Cover asymmetric capabilities and same-prefix mixed updates with synthetic regressions. Reserve room for the OPEN optional-parameter header when adding descriptive and passed-through capabilities, so the Optional Parameters Length octet can no longer wrap. Pin the routecore parser fix from FastNetMon/routecore#5 in Cargo.lock. Keep capability warnings limited to tuples the output cannot reproduce, sharing the supported tuple with the encoder. Extend synthetic regressions and BMP end-to-end coverage for both IPv6 next-hop forms, including ADD-PATH and reconnect dumps. Related to FastNetMon#22. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.
Accept the 16-byte IPv6 and 32-byte global/link-local next-hop forms for IPv4 unicast, multicast and labeled unicast, as specified by RFC 8950. Retain conventional IPv4 next hops and the existing encodings for other address families.
Cover next-hop length boundaries, truncated inputs, MP_REACH attribute ownership and UPDATE builder round trips, including ADD-PATH path IDs. Default and all-features test suites and Clippy pass; synthetic netom integration retains both IPv6 next-hop forms and marks the routes eligible with and without ADD-PATH.
Companion implementation: FastNetMon/netom#23. That PR pins this parser commit in Cargo.lock and adds BMP rebuilding, capability advertisement, and reconnect-dump coverage. Merge this routecore PR first, then the netom PR. If this PR is squash-merged or rebased, refresh netom's lockfile pin to the merged routecore revision before merging netom.
Related to FastNetMon/netom#22.