|
|
36cfb7 |
From 3b6fd8227cbb03b5b211d2cb53534ad405673668 Mon Sep 17 00:00:00 2001
|
|
|
36cfb7 |
From: Matteo Croce <mcroce@redhat.com>
|
|
|
36cfb7 |
Date: Wed, 2 Aug 2017 13:57:17 +0200
|
|
|
36cfb7 |
Subject: [PATCH] ip neigh: allow flush FAILED neighbour entry
|
|
|
36cfb7 |
|
|
|
36cfb7 |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1469945
|
|
|
36cfb7 |
Tested: locally using proper reproducer
|
|
|
36cfb7 |
Upstream Status: merged 37a5f7c5
|
|
|
36cfb7 |
|
|
|
36cfb7 |
commit 37a5f7c571623059ae671992f72feaa444a6ffc8
|
|
|
36cfb7 |
Author: Hangbin Liu <liuhangbin@gmail.com>
|
|
|
36cfb7 |
Date: Fri Jun 16 11:31:52 2017 +0800
|
|
|
36cfb7 |
|
|
|
36cfb7 |
ip neigh: allow flush FAILED neighbour entry
|
|
|
36cfb7 |
|
|
|
36cfb7 |
After upstream commit 5071034e4af7 ('neigh: Really delete an arp/neigh entry
|
|
|
36cfb7 |
on "ip neigh delete" or "arp -d"'), we could delete a single FAILED neighbour
|
|
|
36cfb7 |
entry now. But `ip neigh flush` still skip the FAILED entry.
|
|
|
36cfb7 |
|
|
|
36cfb7 |
Move the filter after first round flush so we can flush FAILED entry on fixed
|
|
|
36cfb7 |
kernel and also do not keep retrying on old kernel.
|
|
|
36cfb7 |
|
|
|
36cfb7 |
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
|
|
|
36cfb7 |
|
|
|
36cfb7 |
Signed-off-by: Matteo Croce <mcroce@redhat.com>
|
|
|
36cfb7 |
---
|
|
|
36cfb7 |
ip/ipneigh.c | 2 +-
|
|
|
36cfb7 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
36cfb7 |
|
|
|
36cfb7 |
diff --git a/ip/ipneigh.c b/ip/ipneigh.c
|
|
|
e138d9 |
index 4d8fc85217451..9c38a60ddf4fe 100644
|
|
|
36cfb7 |
--- a/ip/ipneigh.c
|
|
|
36cfb7 |
+++ b/ip/ipneigh.c
|
|
|
36cfb7 |
@@ -445,7 +445,6 @@ static int do_show_or_flush(int argc, char **argv, int flush)
|
|
|
36cfb7 |
filter.flushb = flushb;
|
|
|
36cfb7 |
filter.flushp = 0;
|
|
|
36cfb7 |
filter.flushe = sizeof(flushb);
|
|
|
36cfb7 |
- filter.state &= ~NUD_FAILED;
|
|
|
36cfb7 |
|
|
|
36cfb7 |
while (round < MAX_ROUNDS) {
|
|
|
36cfb7 |
if (rtnl_dump_request_n(&rth, &req.n) < 0) {
|
|
|
36cfb7 |
@@ -474,6 +473,7 @@ static int do_show_or_flush(int argc, char **argv, int flush)
|
|
|
36cfb7 |
printf("\n*** Round %d, deleting %d entries ***\n", round, filter.flushed);
|
|
|
36cfb7 |
fflush(stdout);
|
|
|
36cfb7 |
}
|
|
|
36cfb7 |
+ filter.state &= ~NUD_FAILED;
|
|
|
36cfb7 |
}
|
|
|
36cfb7 |
printf("*** Flush not complete bailing out after %d rounds\n",
|
|
|
36cfb7 |
MAX_ROUNDS);
|
|
|
36cfb7 |
--
|
|
|
e138d9 |
2.21.0
|
|
|
36cfb7 |
|