From f8c464688d8ca2aa5250ae6828baee1daf06ea93 Mon Sep 17 00:00:00 2001 From: vivek Date: Wed, 9 Jun 2021 13:56:22 -0700 Subject: [PATCH] bgpd: Check L3VNI status before announcing default 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 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bgpd/bgp_evpn_vty.c b/bgpd/bgp_evpn_vty.c index 958a9c6492..338f5cefee 100644 --- a/bgpd/bgp_evpn_vty.c +++ b/bgpd/bgp_evpn_vty.c @@ -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); } /*