Skip to content

Commit

Permalink
Ignore link local neighbors (#1065)
Browse files Browse the repository at this point in the history
  • Loading branch information
prsunny committed Sep 20, 2019
1 parent 0ddaba3 commit a5b6e7c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion neighsyncd/neighsync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a5b6e7c

Please sign in to comment.