From a5b6e7c5a72a1ed3abddc1a800470b2b3a6557c5 Mon Sep 17 00:00:00 2001 From: Prince Sunny Date: Thu, 19 Sep 2019 17:23:30 -0700 Subject: [PATCH] Ignore link local neighbors (#1065) --- neighsyncd/neighsync.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/neighsyncd/neighsync.cpp b/neighsyncd/neighsync.cpp index a4967c050249..c1f83c3aac4a 100644 --- a/neighsyncd/neighsync.cpp +++ b/neighsyncd/neighsync.cpp @@ -61,7 +61,9 @@ void NeighSync::onMsg(int nlmsg_type, struct nl_object *obj) key+= ":"; nl_addr2str(rtnl_neigh_get_dst(neigh), ipStr, MAX_ADDR_SIZE); - + /* Ignore IPv6 link-local addresses as neighbors */ + if (family == IPV6_NAME && IN6_IS_ADDR_LINKLOCAL(nl_addr_get_binary_addr(rtnl_neigh_get_dst(neigh)))) + return; /* Ignore IPv6 multicast link-local addresses as neighbors */ if (family == IPV6_NAME && IN6_IS_ADDR_MC_LINKLOCAL(nl_addr_get_binary_addr(rtnl_neigh_get_dst(neigh)))) return;