]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: don't nexthop-track twice-leaked routes that came from zebra 2558/head
authorG. Paul Ziemba <paulz@labn.net>
Sun, 24 Jun 2018 19:39:03 +0000 (12:39 -0700)
committerLou Berger <lberger@labn.net>
Tue, 26 Jun 2018 15:31:52 +0000 (11:31 -0400)
commit4930a641c5938cd2304604a590022e214eec9eb2
tree514dbcb0ce5043412e983e50554b3d6751e833a0
parent4e0d06d2d4033143109533ae76846dd12a51d27c
bgpd: don't nexthop-track twice-leaked routes that came from zebra

Issue 2381: interface based routes not marked "up" when they originate
in zebra, redistributed to bgp vrf, then imported to vpn and then
imported by another vrf.

Routes that are redistributed into BGP from zebra should not get
nexthop tracking (the assumption is that the originating protocol
is responsible to export or withdraw the route according to its own
notion of nexthop status).

The vpn-vrf route-leaking code checks the source route sub_type to
decide whether to use nexthop tracking on the resulting leaked route.

A route that is redistributed from zebra into bgp will have
sub_type==BGP_ROUTE_REDISTRIBUTE. If it is leaked to the vpn RIB,
the resulting vpn RIB route will have sub_type==BGP_ROUTE_IMPORTED.
If THAT vpn route is leaked to another vrf, the original code will
examine only the leak-source route sub_type and, since it is
not BGP_ROUTE_REDISTRIBUTE, will wrongly try to use nexthop tracking
on the new route in the final vrf.

This change modifies the leak function to track back up the
parent links to the ultimate parent of the leak source route
and look at that route's sub_type instead.

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
bgpd/bgp_mplsvpn.c