From: vivek Date: Thu, 10 Aug 2017 00:17:00 +0000 (-0700) Subject: zebra: Refresh remote neighbors when they go stale X-Git-Tag: frr-4.0-dev~362^2~16 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=c65f709ec66579c7d8bd175b9cef4b4848ed585f;p=mirror%2Ffrr.git zebra: Refresh remote neighbors when they go stale If we get an ageout notification from the kernel for EVPN-installed neighbors, ensure that they are readded. Otherwise, while entries in STALE state are usable, based on other kernel parameters they can get deleted and adding them back only at delete can have other undesirable performance consequences. Note: This is the current Linux kernel behavior (to ageout EVPN installed neighbors). Signed-off-by: Vivek Venkatraman Reviewed-by: Mitesh Kanjariya Ticket: CM-15623, CM-17490 Reviewed By: CCR-6586 Testing Done: Manual, evpn-min --- diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c index 5e7ffb108e..2240d7c763 100644 --- a/zebra/zebra_vxlan.c +++ b/zebra/zebra_vxlan.c @@ -2876,8 +2876,9 @@ int zebra_vxlan_local_neigh_del(struct interface *ifp, } /* - * Handle neighbor add or update (on a VLAN device / L3 interface) - * from the kernel. + * Handle neighbor add or update from the kernel. This is typically + * for a local neighbor on a VLAN device (L3 interface) but can also + * be the ageout notification for a remote neighbor. */ int zebra_vxlan_local_neigh_add_update(struct interface *ifp, struct interface *link_if, @@ -2963,7 +2964,9 @@ int zebra_vxlan_local_neigh_add_update(struct interface *ifp, /* The neighbor is remote and that is the notification we got. */ { - /* TODO: Evaluate if we need to do anything here. */ + /* If the kernel has aged this entry, re-install. */ + if (state & NUD_STALE) + zvni_neigh_install(zvni, n); return 0; } else /* Neighbor has moved from remote to local. */