Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bgpd: fix ipv4-mapped ipv6 on non 6pe
0325116 ("bgpd: fix 6vpe nexthop") enforced sending an IPv4-mapped IPv6 address as nexthop when the BGP session is on IPv4 and address family IPv6. This is not always correct. In some cases, sending an IPv6 global address is valid on an IPv4 session: - MP-BGP is used and the sending router has an IPv4 and a global IPv6 address on the interface towards the peer. - nexthop is set by a route-map, nexthop-self... - router that is sending the UPDATE is a route-reflector or a route-server IPv4-mapped IPv6 nexthop should be limited to the 6PE /6vPE cases where the prefix is reachable via an IPv4 only MPLS backbone. Do not replace the global IPv6 address when sending UPDATE in the cases described above. Also only set the IPv4-mapped IPv6 address as nexthop when only a link-local IPv6 address or no IPv6 address is found on the interface towards the peer. It assumes a 6PE router has a no configured IPv6 address on the interface. Fixes: 0325116 ("bgpd: fix 6vpe nexthop") Signed-off-by: Louis Scalbert <[email protected]>
- Loading branch information