From 3acae086bacea16fdcdd3987f092d678d56bc356 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 14 Jun 2019 21:47:27 -0400 Subject: [PATCH] zebra: Handle 5549 neighbor entry failure state If we get a neighbor entry for 5549 failure notice from the kernel that means that something has probably gone terribly wrong. Let's notice and not reinstall. Signed-off-by: Donald Sharp --- zebra/rt_netlink.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 92c78a4cb..ba052e4e0 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -2413,8 +2413,13 @@ static int netlink_ipneigh_change(struct nlmsghdr *h, int len, ns_id_t ns_id) } /* if kernel marks our rfc5549 neighbor entry invalid, re-install it */ - if (h->nlmsg_type == RTM_NEWNEIGH && !(ndm->ndm_state & NUD_VALID)) - netlink_handle_5549(ndm, zif, ifp, &ip); + if (h->nlmsg_type == RTM_NEWNEIGH && !(ndm->ndm_state & NUD_VALID)) { + if (!(ndm->ndm_state & NUD_FAILED)) + netlink_handle_5549(ndm, zif, ifp, &ip); + else + zlog_info("Neighbor Entry for %s has entered a failed state, not reinstalling", + ifp->name); + } /* The neighbor is present on an SVI. From this, we locate the * underlying -- 2.39.5