Skip to content

Commit 8e32628

Browse files
roopa-prabhudavem330
authored andcommitted
neighbour: force neigh_invalidate when NUD_FAILED update is from admin
In systems where neigh gc thresh holds are set to high values, admin deleted neigh entries (eg ip neigh flush or ip neigh del) can linger around in NUD_FAILED state for a long time until periodic gc kicks in. This patch forces neigh_invalidate when NUD_FAILED neigh_update is from an admin. Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent b1a5046 commit 8e32628

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/core/neighbour.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1148,7 +1148,8 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new,
11481148
neigh->nud_state = new;
11491149
err = 0;
11501150
notify = old & NUD_VALID;
1151-
if ((old & (NUD_INCOMPLETE | NUD_PROBE)) &&
1151+
if (((old & (NUD_INCOMPLETE | NUD_PROBE)) ||
1152+
(flags & NEIGH_UPDATE_F_ADMIN)) &&
11521153
(new & NUD_FAILED)) {
11531154
neigh_invalidate(neigh);
11541155
notify = 1;

0 commit comments

Comments
 (0)