History

Revert "neighbour: force neigh_invalidate when NUD_FAILED update is from admin"

This reverts commit 8e326289e3069dfc9fa9c209924668dd031ab8ef. 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.

Roopa Prabhu committed 8 years ago

Commit d2fb4fb1 parent 4ba4c561 file · +1 −2Browse files

Unified · Split

net/core/neighbour.c+1−2
@@ -1148,8 +1148,7 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, · 1147 unmodified lines
1148 neigh->nud_state = new;1148 neigh->nud_state = new;
1149 err = 0;1149 err = 0;
1150 notify = old & NUD_VALID;1150 notify = old & NUD_VALID;
1151 if (((old & (NUD_INCOMPLETE | NUD_PROBE)) ||1151 if ((old & (NUD_INCOMPLETE | NUD_PROBE)) &&
1152 (flags & NEIGH_UPDATE_F_ADMIN)) &&
1153 (new & NUD_FAILED)) {1152 (new & NUD_FAILED)) {
1154 neigh_invalidate(neigh);1153 neigh_invalidate(neigh);
1155 notify = 1;1154 notify = 1;