Message ID | 1496651489-28110-1-git-send-email-liuhangbin@gmail.com |
---|---|
State | Changes Requested, archived |
Delegated to: | stephen hemminger |
Headers | show |
On Mon, 5 Jun 2017 16:31:29 +0800 Hangbin Liu <liuhangbin@gmail.com> wrote: > After upstream commit 5071034e4af7 ('neigh: Really delete an arp/neigh entry > on "ip neigh delete" or "arp -d"'), we could delete a single FAILED neighbour > entry now. But `ip neigh flush` still skip the FAILED entry. > > Let's remove this filter so we can also flush FAILED entry. > > Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> This might create a problem. iproute2 has to be forward/backwards compatiable with multiple kernel versions. Users must be able to run newer versions of ip command on older kernels. What happens if you run the ip command with your patch on older kernels?
diff --git a/ip/ipneigh.c b/ip/ipneigh.c index 4d8fc85..8082fa8 100644 --- a/ip/ipneigh.c +++ b/ip/ipneigh.c @@ -445,7 +445,6 @@ static int do_show_or_flush(int argc, char **argv, int flush) filter.flushb = flushb; filter.flushp = 0; filter.flushe = sizeof(flushb); - filter.state &= ~NUD_FAILED; while (round < MAX_ROUNDS) { if (rtnl_dump_request_n(&rth, &req.n) < 0) {
After upstream commit 5071034e4af7 ('neigh: Really delete an arp/neigh entry on "ip neigh delete" or "arp -d"'), we could delete a single FAILED neighbour entry now. But `ip neigh flush` still skip the FAILED entry. Let's remove this filter so we can also flush FAILED entry. Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> --- ip/ipneigh.c | 1 - 1 file changed, 1 deletion(-)