diff options
author | Ido Schimmel <idosch@mellanox.com> | 2016-12-23 09:32:48 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-23 12:31:18 -0500 |
commit | 53f800e3baf980827c197a9332f63effe80d4809 (patch) | |
tree | 3d8d3150504942fc2db94e99de6b5b665414c45f /net/core | |
parent | a98f91758995cb59611e61318dddd8a6956b52c3 (diff) | |
download | linux-53f800e3baf980827c197a9332f63effe80d4809.tar.bz2 |
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: a6bf9e933daf ("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>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/neighbour.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 782dd8663665..7bb12e07ffef 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -100,6 +100,7 @@ static void neigh_cleanup_and_release(struct neighbour *neigh) neigh->parms->neigh_cleanup(neigh); __neigh_notify(neigh, RTM_DELNEIGH, 0); + call_netevent_notifiers(NETEVENT_NEIGH_UPDATE, neigh); neigh_release(neigh); } |