summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorRoopa Prabhu <roopa@cumulusnetworks.com>2018-06-25 20:32:53 -0700
committerDavid S. Miller <davem@davemloft.net>2018-06-27 15:40:45 +0900
commit8e326289e3069dfc9fa9c209924668dd031ab8ef (patch)
tree18a987091b3586ccf066a1e16840acf8476ed595 /net/core
parentb1a5046b2497e39cea9eb585358f3749442fb3f7 (diff)
downloadlinux-8e326289e3069dfc9fa9c209924668dd031ab8ef.tar.bz2
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>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/neighbour.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 8e3fda9e725c..cbe85d8d4cc2 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -1148,7 +1148,8 @@ 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)) &&
+ if (((old & (NUD_INCOMPLETE | NUD_PROBE)) ||
+ (flags & NEIGH_UPDATE_F_ADMIN)) &&
(new & NUD_FAILED)) {
neigh_invalidate(neigh);
notify = 1;