]> git.puffer.fish Git - matthieu/frr.git/commit
bgpd: fix use nexthop tracking for exported vpn paths
authorPhilippe Guibert <philippe.guibert@6wind.com>
Thu, 1 Jun 2023 05:20:06 +0000 (07:20 +0200)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Fri, 16 Jun 2023 08:55:17 +0000 (10:55 +0200)
commitb9c7e7a1a9ab22e83571652ff092bb519a7386f7
treeeea95d39e79bd87a6fce58770e16ef2107f0d3ce
parent346607c7d3f91fe5b08657642ef92e79299737b2
bgpd: fix use nexthop tracking for exported vpn paths

When exporting redistributed prefixes from a given VRF
to an MPLS VPN network, the paths are always considered
as valid whereas it should not always be the case.

At exportation, a new MPLS VPN path is built in. Then
nexthop tracking is applied to the new path, and the
SAFI_MPLS_VPN parameter is used to tell the NHT code
to just check for the next-hop reachability. The previous
commit was wrongly considering that nexthop tracking was
never applied to mpls vpn networks. Ensure that nexthop
tracking for exported paths behaves as usual.

Fix this by not returning always 1 in the 'bgp_find_or_add_nexthop()'
function if the passed 'pi' parameter is a 'BGP_IMPORTED_ROUTE'
sub-type entry.

Fixes: 74be3f3ea9ec ("bgpd: track mpls vpn nexthops")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
bgpd/bgp_nht.c