]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: Enhance loop checking for VRF to VPN route export
authorvivek <vivek@cumulusnetworks.com>
Thu, 29 Mar 2018 05:13:05 +0000 (22:13 -0700)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 25 Apr 2018 16:39:16 +0000 (12:39 -0400)
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>
bgpd/bgp_mplsvpn.c

index 5038151752c234f4694acaa62c681166aec79768..fb15f90c28f9882672cbc91efdb52463fabc2bf4 100644 (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;