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 <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
This commit is contained in:
vivek 2021-06-09 13:56:22 -07:00 committed by Donald Sharp
parent e2b20dfb33
commit f8c464688d

View 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);
}
/*