From 8b44d564c3a513c3af6fb0c440321971f03a5c8e Mon Sep 17 00:00:00 2001 From: vivek Date: Mon, 20 Aug 2018 18:21:21 +0000 Subject: [PATCH] zebra: Update neighbor state correctly upon move When a host moves and is locally reachable, if the local neighbor event is received before the local MAC event, flag the neighbor as inactive just as would happen in the case of a new host. This ensures that the MACIP route will get originated as soon as the local MAC event is got. Signed-off-by: Vivek Venkatraman --- zebra/zebra_vxlan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c index 04f9be8ade..3c6ee67545 100644 --- a/zebra/zebra_vxlan.c +++ b/zebra/zebra_vxlan.c @@ -2061,7 +2061,7 @@ static int zvni_local_neigh_update(zebra_vni_t *zvni, } /* Before we program this in BGP, we need to check if MAC is locally - * learnt as well + * learnt. If not, force neighbor to be inactive. */ if (!CHECK_FLAG(zmac->flags, ZEBRA_MAC_LOCAL)) { if (IS_ZEBRA_DEBUG_VXLAN) @@ -2071,6 +2071,7 @@ static int zvni_local_neigh_update(zebra_vni_t *zvni, prefix_mac2str(macaddr, buf, sizeof(buf)), zvni->vni); + ZEBRA_NEIGH_SET_INACTIVE(n); return 0; } -- 2.39.5