]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Fix route-leak/L3VPN delete of redistributed routes
authorvivek <vivek@cumulusnetworks.com>
Wed, 4 Apr 2018 16:43:14 +0000 (09:43 -0700)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 25 Apr 2018 16:39:16 +0000 (12:39 -0400)
Ensure that when a route redistributed into a VRF is subsequently
deleted, it is properly removed from the VPN table (if exported)
so that it can be removed from other VRFs and withdrawn from
L3VPN peers.

Ticket: CM-20345
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
bgpd/bgp_mplsvpn.c

index fb15f90c28f9882672cbc91efdb52463fabc2bf4..7c6a3a37f81f48859b93e0243256c3c482506c6d 100644 (file)
@@ -858,14 +858,9 @@ void vpn_leak_from_vrf_withdraw(struct bgp *bgp_vpn,       /* to */
                        info_vrf->type, info_vrf->sub_type);
        }
 
-       if (info_vrf->type != ZEBRA_ROUTE_BGP) {
-               if (debug)
-                       zlog_debug("%s: wrong type %d", __func__,
-                                  info_vrf->type);
-               return;
-       }
        if (info_vrf->sub_type != BGP_ROUTE_NORMAL
-           && info_vrf->sub_type != BGP_ROUTE_STATIC) {
+           && info_vrf->sub_type != BGP_ROUTE_STATIC
+           && info_vrf->sub_type != BGP_ROUTE_REDISTRIBUTE) {
 
                if (debug)
                        zlog_debug("%s: wrong sub_type %d", __func__,