summaryrefslogtreecommitdiff
path: root/bgpd/bgp_evpn_private.h
diff options
context:
space:
mode:
authorvivek <vivek@cumulusnetworks.com>2019-08-18 23:07:59 -0700
committervivek <vivek@cumulusnetworks.com>2019-08-18 23:07:59 -0700
commit3d0b43d7c5cfb4377d7d51966d50616ec37629ab (patch)
tree3b136b628bf18f52e5aad689299b7333c179bde8 /bgpd/bgp_evpn_private.h
parentf067bdf8e2a468d1c7f553b212de2520609d081b (diff)
bgpd: Ensure correct checks for EVPN route import
In a situation where a VRF has configured route targets for importing EVPN routes, this configuration may exist prior to the VRF being ready to have EVPN routes installed into it - e.g., still missing the L3VNI configuration or associated interface information. Ensure that this is taken into account during EVPN route import and unimport. Without this fix, EVPN routes would end up being prematurely imported into the VRF routing table and consequently installed as inactive (because the nexthop information would be incorrect when BGP informs zebra). Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_evpn_private.h')
-rw-r--r--bgpd/bgp_evpn_private.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/bgpd/bgp_evpn_private.h b/bgpd/bgp_evpn_private.h
index a5a091242f..f6bde2e9fa 100644
--- a/bgpd/bgp_evpn_private.h
+++ b/bgpd/bgp_evpn_private.h
@@ -275,6 +275,11 @@ static inline int is_vni_live(struct bgpevpn *vpn)
return (CHECK_FLAG(vpn->flags, VNI_FLAG_LIVE));
}
+static inline int is_l3vni_live(struct bgp *bgp_vrf)
+{
+ return (bgp_vrf->l3vni && bgp_vrf->l3vni_svi_ifindex);
+}
+
static inline int is_rd_configured(struct bgpevpn *vpn)
{
return (CHECK_FLAG(vpn->flags, VNI_FLAG_RD_CFGD));