]> git.baikalelectronics.ru Git - kernel.git/commit
neigh: Send netevent after marking neigh as dead
authorIdo Schimmel <idosch@mellanox.com>
Fri, 23 Dec 2016 08:32:48 +0000 (09:32 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Dec 2016 17:31:18 +0000 (12:31 -0500)
commitcd027f066911f372bb2ae351dfa62ea2e0ae70c6
tree3d8d3150504942fc2db94e99de6b5b665414c45f
parentbf69bb72d3cb98dd539e59c19566c3265b75cc68
neigh: Send netevent after marking neigh as dead

neigh_cleanup_and_release() is always called after marking a neighbour
as dead, but it only notifies user space and not in-kernel listeners of
the netevent notification chain.

This can cause multiple problems. In my specific use case, it causes the
listener (a switch driver capable of L3 offloads) to believe a neighbour
entry is still valid, and is thus erroneously kept in the device's
table.

Fix that by sending a netevent after marking the neighbour as dead.

Fixes: 89b33e4416d5 ("mlxsw: spectrum_router: Offload neighbours based on NUD state change")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/neighbour.c