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 <chirag@nvidia.com>
This commit is contained in:
Chirag Shah 2024-11-19 12:24:30 -08:00
parent 0bacbc6493
commit adae8192d1

View File

@ -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);
}
}