From adae8192d184beafdf84b15b24b66c7ccd0c92e0 Mon Sep 17 00:00:00 2001 From: Chirag Shah Date: Tue, 19 Nov 2024 12:24:30 -0800 Subject: [PATCH] zebra: EVPN check vxlan oper up in vlan mapping When VLAN-VNI mapping is updated, do not set the L2VNI up event if the associated VXLAN device is not up. This may result in bgp synced remote routes to skip installing in Zebra and onwards (Kernel). Ticket: #4139506 Signed-off-by: Chirag Shah --- zebra/zebra_vxlan_if.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/zebra/zebra_vxlan_if.c b/zebra/zebra_vxlan_if.c index 17ab05c1f3..2658c9f01c 100644 --- a/zebra/zebra_vxlan_if.c +++ b/zebra/zebra_vxlan_if.c @@ -1032,7 +1032,13 @@ int zebra_vxlan_if_vni_up(struct interface *ifp, struct zebra_vxlan_vni *vnip) /* If part of a bridge, inform BGP about this VNI. */ /* Also, read and populate local MACs and neighbors. */ if (zif->brslave_info.br_if) { - zebra_evpn_send_add_to_client(zevpn); + if (if_is_operative(zevpn->vxlan_if)) { + zebra_evpn_send_add_to_client(zevpn); + } else { + if (IS_ZEBRA_DEBUG_KERNEL || IS_ZEBRA_DEBUG_VXLAN) + zlog_debug("%s VNI %u vxlan_if %s oper down skipping vni up to client", + __func__, zevpn->vni, zevpn->vxlan_if->name); + } zebra_evpn_read_mac_neigh(zevpn, ifp); } }