]> git.proxmox.com Git - mirror_frr.git/commitdiff
zebra: Update neighbor state correctly upon move
authorvivek <vivek@cumulusnetworks.com>
Mon, 20 Aug 2018 18:21:21 +0000 (18:21 +0000)
committervivek <vivek@cumulusnetworks.com>
Mon, 20 Aug 2018 18:21:21 +0000 (18:21 +0000)
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 <vivek@cumulusnetworks.com>
zebra/zebra_vxlan.c

index 04f9be8ade801f1a9cc24444f75f5093270370f1..3c6ee67545005adb297f2e6e6479f667ff0401d9 100644 (file)
@@ -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;
        }