mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 18:56:40 +00:00
zebra: mark router flag for neigh update
The neigh update can come prior to mac add update. In this case, the mac will be auto created for the vni. set router flag to local neigh update for mac with auto flag. The neigh update will be informed to bgpd once local mac is learnt. Unset router flag if the neigh update comes without the router flag for an existing neigh entry. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
This commit is contained in:
parent
0a4ecf2729
commit
54c174250c
@ -2060,6 +2060,12 @@ static int zvni_local_neigh_update(zebra_vni_t *zvni,
|
||||
n->ifindex = ifp->ifindex;
|
||||
}
|
||||
|
||||
/*Mark Router flag (R-bit) */
|
||||
if (router_flag)
|
||||
SET_FLAG(n->flags, ZEBRA_NEIGH_ROUTER_FLAG);
|
||||
else
|
||||
UNSET_FLAG(n->flags, ZEBRA_NEIGH_ROUTER_FLAG);
|
||||
|
||||
/* Before we program this in BGP, we need to check if MAC is locally
|
||||
* learnt as well
|
||||
*/
|
||||
@ -2074,10 +2080,6 @@ static int zvni_local_neigh_update(zebra_vni_t *zvni,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*Set router flag (R-bit) */
|
||||
if (router_flag)
|
||||
SET_FLAG(n->flags, ZEBRA_NEIGH_ROUTER_FLAG);
|
||||
|
||||
/* Inform BGP. */
|
||||
if (IS_ZEBRA_DEBUG_VXLAN)
|
||||
zlog_debug("Neigh %s (MAC %s) is now ACTIVE on L2-VNI %u with flags 0x%x",
|
||||
@ -4965,10 +4967,11 @@ int zebra_vxlan_handle_kernel_neigh_update(struct interface *ifp,
|
||||
|
||||
if (IS_ZEBRA_DEBUG_VXLAN)
|
||||
zlog_debug(
|
||||
"Add/Update neighbor %s MAC %s intf %s(%u) state 0x%x %s-> L2-VNI %u",
|
||||
"Add/Update neighbor %s MAC %s intf %s(%u) state 0x%x %s %s-> L2-VNI %u",
|
||||
ipaddr2str(ip, buf2, sizeof(buf2)),
|
||||
prefix_mac2str(macaddr, buf, sizeof(buf)), ifp->name,
|
||||
ifp->ifindex, state, ext_learned ? "ext-learned " : "",
|
||||
router_flag ? "router " : "",
|
||||
zvni->vni);
|
||||
|
||||
/* Is this about a local neighbor or a remote one? */
|
||||
|
Loading…
Reference in New Issue
Block a user