]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: Refresh remote neighbors when they go stale
authorvivek <vivek@cumulusnetworks.com>
Thu, 10 Aug 2017 00:17:00 +0000 (17:17 -0700)
committerMitesh Kanjariya <mitesh@marvel-07.cumulusnetworks.com>
Thu, 17 Aug 2017 09:53:29 +0000 (02:53 -0700)
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 <vivek@cumulusnetworks.com>
Reviewed-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
Ticket: CM-15623, CM-17490
Reviewed By: CCR-6586
Testing Done: Manual, evpn-min

zebra/zebra_vxlan.c

index 5e7ffb108eed63e15c7602a7398678085266a76c..2240d7c763a96a16c0fd448c008f250501a05283 100644 (file)
@@ -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. */