summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_vxlan_private.h
diff options
context:
space:
mode:
authorMitesh Kanjariya <mitesh@marvel-07.cumulusnetworks.com>2017-11-14 08:12:15 +0100
committerMitesh Kanjariya <mitesh@marvel-07.cumulusnetworks.com>2017-12-14 19:57:08 +0100
commit655b04d1c2fdcc056ff3c431468462a9b8a051c3 (patch)
tree1d9e8fed06ef44b15eebc378496acc6a36b17950 /zebra/zebra_vxlan_private.h
parentbgpd: uninstall type-5 routes from vrf (diff)
downloadfrr-655b04d1c2fdcc056ff3c431468462a9b8a051c3.tar.xz
frr-655b04d1c2fdcc056ff3c431468462a9b8a051c3.zip
zebra/bgpd: cleanup l3vni on no advertise-all-vni
EVPN is only enabled when user configures advertise-all-vni. All VNIs (L2 and L3) should be cleared upon removal of this config. Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_vxlan_private.h')
-rw-r--r--zebra/zebra_vxlan_private.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/zebra/zebra_vxlan_private.h b/zebra/zebra_vxlan_private.h
index 8aeb46c94..ef6f9b99c 100644
--- a/zebra/zebra_vxlan_private.h
+++ b/zebra/zebra_vxlan_private.h
@@ -30,6 +30,7 @@
#include "if.h"
#include "linklist.h"
+#include "zebra_vxlan.h"
#define ERR_STR_SZ 256
@@ -165,6 +166,7 @@ static inline const char *zl3vni_rmac2str(zebra_l3vni_t *zl3vni, char *buf,
/*
* l3-vni is oper up when:
+ * 0. if EVPN is enabled (advertise-all-vni cfged)
* 1. it is associated to a vxlan-intf
* 2. Associated vxlan-intf is oper up
* 3. it is associated to an SVI
@@ -172,7 +174,7 @@ static inline const char *zl3vni_rmac2str(zebra_l3vni_t *zl3vni, char *buf,
*/
static inline int is_l3vni_oper_up(zebra_l3vni_t *zl3vni)
{
- return (zl3vni &&
+ return (is_evpn_enabled() && zl3vni &&
(zl3vni->vrf_id != VRF_UNKNOWN) &&
zl3vni->vxlan_if && if_is_operative(zl3vni->vxlan_if) &&
zl3vni->svi_if && if_is_operative(zl3vni->svi_if));