summaryrefslogtreecommitdiff
path: root/zebra/zebra_vxlan.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_vxlan.c')
-rw-r--r--zebra/zebra_vxlan.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c
index 88a4375238..0ceaed8d24 100644
--- a/zebra/zebra_vxlan.c
+++ b/zebra/zebra_vxlan.c
@@ -9045,7 +9045,10 @@ void zebra_vxlan_advertise_all_vni(ZAPI_HANDLER_ARGS)
struct zebra_vrf *zvrf_default = NULL;
zvrf_default = zebra_vrf_lookup_by_id(VRF_DEFAULT);
- if (!zvrf_default)
+
+ /* Mismatch between EVPN VRF and current VRF (should be prevented by
+ * bgpd's cli) */
+ if (is_evpn_enabled() && !zvrf->advertise_all_vni)
return;
s = msg;