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