Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
6vPE enables the announcement of IPv6 VPN prefixes through an IPv4 BGP session. In this scenario, the next hop addresses for these prefixes are represented in an IPv4-mapped IPv6 format, noted as ::ffff:[IPv4]. This format indicates to the peer that it should route these IPv6 addresses using information from the IPv4 nexthop. For example: > Path Attribute - MP_REACH_NLRI > [...] > Address family identifier (AFI): IPv6 (2) > Subsequent address family identifier (SAFI): Labeled VPN Unicast (128) > Next hop: RD=0:0 IPv6=::ffff:192.0.2.5 RD=0:0 Link-local=fe80::501d:42ff:feef:b021 > Number of Subnetwork points of attachment (SNPA): 0 This rule is set out in RFC4798: > The IPv4 address of the egress 6PE router MUST be encoded as an > IPv4-mapped IPv6 address in the BGP Next Hop field. However, in some situations, bgpd sends a standard nexthop IPv6 address instead of an IPv4-mapped IPv6 address because the outgoing interface for the BGP session has a valid IPv6 address. This is problematic because the peer router may not be able to route the nexthop IPv6 address (ie. if the outgoing interface has not IPv6). Fix the issue by always sending a IPv4-mapped IPv6 address as nexthop when the BGP session is on IPv4 and address family IPv6. Link: https://datatracker.ietf.org/doc/html/rfc4798#section-2 Fixes: 92d6f76 ("lib,zebra,bgpd: Fix for nexthop as IPv4 mapped IPv6 address") Signed-off-by: Louis Scalbert <[email protected]>
- Loading branch information