]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: track mpls vpn nexthops
authorPhilippe Guibert <philippe.guibert@6wind.com>
Fri, 21 Apr 2023 12:28:28 +0000 (14:28 +0200)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Fri, 16 Jun 2023 08:54:58 +0000 (10:54 +0200)
commitcd0e9bfbc43e5cd30c90a4ea16e1e810f94a7477
tree7e94e97ac241be12a23c0646c001db324a499fd0
parent658c5ebe385ac315367ce964cda06f52ad050b07
bgpd: track mpls vpn nexthops

There is no nexthop reachability information for
received MPLS VPN prefixes.
This information is necessary when BGP also acts
as LSR device, and is needed to create an MPLS entry
between two BGP speakers: the next-hop to pick-up
in the MPLS entry has to be connected.

The nexthop reachability information is available
for other non MPLS VPN prefixes, and is handled
by the bgp nexthop cache (bnc) contexts.
Extend the usage of the BNC contexts for L3VPN
prefixes.

Note that the MPLS VPN routes had to be redistributed
as before, to avoid breaking existing deployments
that use FRR as route reflectors. Because of this, the
nexthop reachability status has been maintained to OK
for MPLS VPN prefixes.

Note also that the label allocation per nexthop tracking
was wrongly using the MPLS VPN safi to get a valid BNC
context, when choosing which label to return in the
'vpn_leak_from_vrf_get_per_nexthop_label()' function.
Fix this by using SAFI_UNICAST instead.

Fixes: 577be36a41be ("bgpd: add support for l3vpn per-nexthop label")
Link: https://github.com/FRRouting/frr/pull/13380
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
bgpd/bgp_nht.c
bgpd/bgp_route.c