Closed amgadhanafy closed 4 years ago
As of RFC5549 Advertising IPv4 Network Layer Reachability Information with an IPv6 Next Hop
Specifically, this document allows advertising with [RFC4760] of an MP_REACH_NLRI with:
- AFI = 1
- SAFI = 1, 2, 4, or 128
- Length of Next Hop Address = 16 or 32
- Next Hop Address = IPv6 address of next hop (potentially followed by the link-local IPv6 address of the next hop). This field is to be constructed as per Section 3 of [RFC2545].
- NLRI= NLRI as per current AFI/SAFI definition This is in addition to the current mode of operation allowing advertisement of NLRI for <AFI/SAFI> of <1/1>, <1/2> and <1/4> with a next hop address of IPv4 type and advertisement of NLRI for <AFI/SAFI> of <1/128> with a next hop address of VPN-IPv4 type. The BGP speaker receiving the advertisement MUST use the Length of Next Hop Address field to determine which network-layer protocol the next hop address belongs to. When the Length of Next Hop Address field is equal to 16 or 32, the next hop address is of type IPv6. This field is to be constructed as per Section 3 of [RFC2545].
The suggested fix is handling both cases when IP4 and IP6 and next hop address length is either 16 or 32 (1 or 2 hops)
Data set from https://packetlife.net/captures/protocol/bgp/ https://packetlife.net/media/captures/BGP_MP_NLRI.cap Packet 20
next-hop has 2 ip6 (32 bytes) but considered as one IP
error
packet in wire shark