From c65f709ec66579c7d8bd175b9cef4b4848ed585f Mon Sep 17 00:00:00 2001 From: vivek Date: Wed, 9 Aug 2017 17:17:00 -0700 Subject: [PATCH] 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 --- zebra/zebra_vxlan.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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. */ -- 2.39.5