]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Check L3VNI status before announcing default
authorvivek <vivek@cumulusnetworks.com>
Wed, 9 Jun 2021 20:56:22 +0000 (13:56 -0700)
committerDonald Sharp <sharpd@nvidia.com>
Mon, 9 Dec 2024 17:31:29 +0000 (12:31 -0500)
Check that the L3VNI is "up" before taking action to announce or
withdraw the EVPN type-5 default based on configuration. Otherwise,
there can be timing conditions where a EVPN type-5 default route
gets announced without a VNI and with invalid route targets.

Signed-off-by: Vivek Venkatraman <vivek@nvidia.com>
Ticket: #2684144
Reviewed By: Chirag Shah
Testing Done:
1. Rerun failed test multiple times successfully
2. Some manual testing
3. precommit and partial evpn-smoke

bgpd/bgp_evpn_vty.c

index 958a9c6492b58fb2157228562dfbe2bf455ff140..338f5cefee0ca635c0ff7f0a555a4aee7987edbc 100644 (file)
@@ -3469,7 +3469,9 @@ static void evpn_process_default_originate_cmd(struct bgp *bgp_vrf,
                                   BGP_L2VPN_EVPN_DEFAULT_ORIGINATE_IPV6);
        }
 
-       bgp_evpn_install_uninstall_default_route(bgp_vrf, afi, safi, add);
+       if (is_l3vni_live(bgp_vrf))
+               bgp_evpn_install_uninstall_default_route(bgp_vrf,
+                                                        afi, safi, add);
 }
 
 /*