Skip to content

Commit

Permalink
Revert "neighbour: force neigh_invalidate when NUD_FAILED update is f…
Browse files Browse the repository at this point in the history
…rom admin"

This reverts commit 8e32628.

This patch results in unnecessary netlink notification when one
tries to delete a neigh entry already in NUD_FAILED state. Found
this with a buggy app that tries to delete a NUD_FAILED entry
repeatedly. While the notification issue can be fixed with more
checks, adding more complexity here seems unnecessary. Also,
recent tests with other changes in the neighbour code have
shown that the INCOMPLETE and PROBE checks are good enough for
the original issue.

Signed-off-by: Roopa Prabhu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
roopa-prabhu authored and davem330 committed Oct 21, 2018
1 parent 4ba4c56 commit d2fb4fb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/core/neighbour.c
Original file line number Diff line number Diff line change
Expand Up @@ -1148,8 +1148,7 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new,
neigh->nud_state = new;
err = 0;
notify = old & NUD_VALID;
if (((old & (NUD_INCOMPLETE | NUD_PROBE)) ||
(flags & NEIGH_UPDATE_F_ADMIN)) &&
if ((old & (NUD_INCOMPLETE | NUD_PROBE)) &&
(new & NUD_FAILED)) {
neigh_invalidate(neigh);
notify = 1;
Expand Down

0 comments on commit d2fb4fb

Please sign in to comment.