summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_vxlan.c
diff options
context:
space:
mode:
authorChirag Shah <chirag@cumulusnetworks.com>2019-05-09 21:25:44 +0200
committerChirag Shah <chirag@cumulusnetworks.com>2019-05-10 20:10:42 +0200
commit5756dd1d07393ffa68f5e3a03e84ff7e23beca1b (patch)
treede46a1a636d1cc8fb52f2556d581b219b932b18f /zebra/zebra_vxlan.c
parentMerge pull request #4275 from ton31337/fix/move_outside_bgp_input_modifier (diff)
downloadfrr-5756dd1d07393ffa68f5e3a03e84ff7e23beca1b.tar.xz
frr-5756dd1d07393ffa68f5e3a03e84ff7e23beca1b.zip
zebra: unset sticky mac upon local deletion
if the local sticky mac delete request is received, if there are associated neighbor entries present, mac's only local flag is removed and marked as auto mac. this results in next local mac learning automatically assumes mac is sticky. There is a case when bridge learning off is configured, user configures sticky mac via bridge fdb add. This MAC learns associated neighbor entry. Later user deletes stick mac via bridge fdb del, this triggers frr to delete mac but if there are neighbors present, frr marks MAC as AUTO but does not remove sticky flag. User enables bridge learning on which triggers The mac to learn as dynamic entry and in absence of this fix, the mac is marked as sticky. Ticket:CM-24968 Reviewed By:CCR-8683 Testing Done: Validated broken condition with internally reproduction with fix and without. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
Diffstat (limited to '')
-rw-r--r--zebra/zebra_vxlan.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c
index baa050c9b..605e9eae6 100644
--- a/zebra/zebra_vxlan.c
+++ b/zebra/zebra_vxlan.c
@@ -7505,9 +7505,9 @@ int zebra_vxlan_check_del_local_mac(struct interface *ifp,
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
- "Add/update remote MAC %s intf %s(%u) VNI %u - del local",
+ "Add/update remote MAC %s intf %s(%u) VNI %u flags 0x%x - del local",
prefix_mac2str(macaddr, buf, sizeof(buf)), ifp->name,
- ifp->ifindex, vni);
+ ifp->ifindex, vni, mac->flags);
/* Remove MAC from BGP. */
zvni_mac_send_del_to_client(zvni->vni, macaddr);
@@ -7520,6 +7520,7 @@ int zebra_vxlan_check_del_local_mac(struct interface *ifp,
zvni_mac_del(zvni, mac);
} else {
UNSET_FLAG(mac->flags, ZEBRA_MAC_LOCAL);
+ UNSET_FLAG(mac->flags, ZEBRA_MAC_STICKY);
SET_FLAG(mac->flags, ZEBRA_MAC_AUTO);
}
@@ -7603,11 +7604,6 @@ int zebra_vxlan_local_mac_del(struct interface *ifp, struct interface *br_if,
return -1;
}
- if (IS_ZEBRA_DEBUG_VXLAN)
- zlog_debug("DEL MAC %s intf %s(%u) VID %u -> VNI %u",
- prefix_mac2str(macaddr, buf, sizeof(buf)), ifp->name,
- ifp->ifindex, vid, zvni->vni);
-
/* If entry doesn't exist, nothing to do. */
mac = zvni_mac_lookup(zvni, macaddr);
if (!mac)
@@ -7617,6 +7613,11 @@ int zebra_vxlan_local_mac_del(struct interface *ifp, struct interface *br_if,
if (!CHECK_FLAG(mac->flags, ZEBRA_MAC_LOCAL))
return 0;
+ if (IS_ZEBRA_DEBUG_VXLAN)
+ zlog_debug("DEL MAC %s intf %s(%u) VID %u -> VNI %u flags 0x%x",
+ prefix_mac2str(macaddr, buf, sizeof(buf)), ifp->name,
+ ifp->ifindex, vid, zvni->vni, mac->flags);
+
/* Update all the neigh entries associated with this mac */
zvni_process_neigh_on_local_mac_del(zvni, mac);
@@ -7631,6 +7632,7 @@ int zebra_vxlan_local_mac_del(struct interface *ifp, struct interface *br_if,
zvni_mac_del(zvni, mac);
} else {
UNSET_FLAG(mac->flags, ZEBRA_MAC_LOCAL);
+ UNSET_FLAG(mac->flags, ZEBRA_MAC_STICKY);
SET_FLAG(mac->flags, ZEBRA_MAC_AUTO);
}