bgpd: Enhance loop checking for VRF to VPN route export

The VRF routes exported to the global VPN table must not be
imported routes. It is not necessary to check if they originate
in the global VPN instance as that doesn't hold good for VRF-to-
VRF route-leaking. Merely checking that they are not imported
should handle both L3VPN and VRF-to-VRF route-leaking use cases.

Ticket: CM-20283
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
This commit is contained in:
vivek 2018-03-28 22:13:05 -07:00 committed by Donald Sharp
parent 1ec90b5ede
commit cc5a6ddd06

View File

@ -654,8 +654,8 @@ void vpn_leak_from_vrf_update(struct bgp *bgp_vpn, /* to */
return;
}
/* loop check */
if (info_vrf->extra && info_vrf->extra->bgp_orig == bgp_vpn)
/* loop check - should not be an imported route. */
if (info_vrf->extra && info_vrf->extra->bgp_orig)
return;