summaryrefslogtreecommitdiff
path: root/zebra/rt_netlink.c
diff options
context:
space:
mode:
authorMitesh Kanjariya <mitesh@marvel-07.cumulusnetworks.com>2018-03-02 15:28:33 -0800
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-04-12 09:07:43 -0400
commitee69da278d26aa46042302238ed6753022f42aa7 (patch)
tree3489f5a340b9964ed5ad10b18e41debe753a367a /zebra/rt_netlink.c
parent689b510143d3ee779c78ca4c04153e3fb6df13ae (diff)
zebra: act on kernel notifications for remote neighbors as well
There can be a race condition between kernel and frr as follows. Frr sends remote neigh notification. At the (almost) same time kernel might send a notification saying neigh is local. After processing this notifications, the state in frr is local while state in kernel is remote. This causes kernel and frr to be out of sync. This problem will be avoided if FRR acts on the kernel notifications for remote neighbors. When FRR sees a remote neighbor notification for a neighbor which it thinks is local, FRR will change the neigh state to remote. Ticket: CM-19923/CM-18830 Review: CCR-7222 Testing: Manual Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Diffstat (limited to 'zebra/rt_netlink.c')
-rw-r--r--zebra/rt_netlink.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index df53a06bc2..fbaa9c4783 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -2220,11 +2220,11 @@ static int netlink_ipneigh_change(struct sockaddr_nl *snl, struct nlmsghdr *h,
* in re-adding the neighbor if it is a valid "remote" neighbor.
*/
if (ndm->ndm_state & NUD_VALID)
- return zebra_vxlan_local_neigh_add_update(
+ return zebra_vxlan_handle_kernel_neigh_update(
ifp, link_if, &ip, &mac, ndm->ndm_state,
ext_learned);
- return zebra_vxlan_local_neigh_del(ifp, link_if, &ip);
+ return zebra_vxlan_handle_kernel_neigh_del(ifp, link_if, &ip);
}
if (IS_ZEBRA_DEBUG_KERNEL)
@@ -2237,7 +2237,7 @@ static int netlink_ipneigh_change(struct sockaddr_nl *snl, struct nlmsghdr *h,
/* Process the delete - it may result in re-adding the neighbor if it is
* a valid "remote" neighbor.
*/
- return zebra_vxlan_local_neigh_del(ifp, link_if, &ip);
+ return zebra_vxlan_handle_kernel_neigh_del(ifp, link_if, &ip);
}
static int netlink_neigh_table(struct sockaddr_nl *snl, struct nlmsghdr *h,