Bug 1036534 - ip neigh flush does not work
Summary: ip neigh flush does not work
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: iproute
Version: 6.6
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Pavel Šimerda (pavlix)
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-02 09:17 UTC by Hangbin Liu
Modified: 2015-04-21 01:24 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-04-15 10:14:51 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Hangbin Liu 2013-12-02 09:17:36 UTC
Description of problem:
ip neigh flush does not work

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
# ip neigh show
1.1.1.2 dev eth3 lladdr 00:11:22:33:44:68 PERMANENT
10.66.87.254 dev eth3 lladdr ec:30:91:e2:4b:00 DELAY
# ip neigh flush dev eth3
# echo $?
0


Actual results:
# ip neigh show
1.1.1.2 dev eth3 lladdr 00:11:22:33:44:68 PERMANENT
10.66.87.254 dev eth3 lladdr ec:30:91:e2:4b:00 REACHABLE

Expected results:
no neighbour exist

Additional info:
upstream iproute also have this issue

Comment 1 Pavel Šimerda (pavlix) 2014-09-11 12:58:37 UTC
Current upstream version of iproute seems to require more arguments to "ip neigh flush", e.g. "ip neigh flush all".

Comment 2 Hangbin Liu 2014-09-12 02:06:15 UTC
(In reply to Pavel Šimerda (pavlix) from comment #1)
> Current upstream version of iproute seems to require more arguments to "ip
> neigh flush", e.g. "ip neigh flush all".

Does dev $DEV not enough? I don't want to flush all the neighbor info.

Comment 3 Pavel Šimerda (pavlix) 2014-09-12 09:16:59 UTC
(In reply to Hangbin Liu from comment #2)
> (In reply to Pavel Šimerda (pavlix) from comment #1)
> > Current upstream version of iproute seems to require more arguments to "ip
> > neigh flush", e.g. "ip neigh flush all".
> 
> Does dev $DEV not enough? I don't want to flush all the neighbor info.

Yes, that should work (and works upstream, see below), missed that in the bug report.

Using current upstream, the behavior is not exactly as described in the expected result but all records turn to FAILED for me and after some time they get recovered. We'll have to see whether the problem is in iproute, kernel or the reproducer itself.

Comment 5 Pavel Šimerda (pavlix) 2015-04-07 20:43:32 UTC
I'm re-testing this issue for a dynamic neighbour entry in a VM and it apparently behaves correctly but one has to check the results with a good timing to avoid having them spoiled by new discovery.

[root@rhel6 iproute2]# ip neighbor                 
192.168.122.1 dev eth0 lladdr fe:54:00:03:b4:de REACHABLE

[root@rhel6 iproute2]# ip neighbor flush dev eth0; ip neighbor
192.168.122.1 dev eth0  INCOMPLETE

[root@rhel6 iproute2]# ip neighbor
192.168.122.1 dev eth0 lladdr fe:54:00:03:b4:de REACHABLE

Also upstream documentation (man ip-neighbour) clearly says that permanent and noarp entries are excluded from flushing and therefore it is unlikely that they will accept patches changing that.

Is there any reason not to close the bug?

Tested components:

iproute-2.6.32-45.el6.x86_64
kernel-2.6.32-540.el6.x86_64

Comment 6 Pavel Šimerda (pavlix) 2015-04-15 10:14:51 UTC
(In reply to Pavel Šimerda (pavlix) from comment #5)
> I'm re-testing this issue for a dynamic neighbour entry in a VM and it
> apparently behaves correctly but one has to check the results with a good
> timing to avoid having them spoiled by new discovery.
> 
> [root@rhel6 iproute2]# ip neighbor                 
> 192.168.122.1 dev eth0 lladdr fe:54:00:03:b4:de REACHABLE
> 
> [root@rhel6 iproute2]# ip neighbor flush dev eth0; ip neighbor
> 192.168.122.1 dev eth0  INCOMPLETE
> 
> [root@rhel6 iproute2]# ip neighbor
> 192.168.122.1 dev eth0 lladdr fe:54:00:03:b4:de REACHABLE
> 
> Also upstream documentation (man ip-neighbour) clearly says that permanent
> and noarp entries are excluded from flushing and therefore it is unlikely
> that they will accept patches changing that.
> 
> Is there any reason not to close the bug?

Closing. According to my tests 'ip neighbor flush' behaves as documented.

Comment 7 Hangbin Liu 2015-04-21 01:24:01 UTC
remove the needinfo flag since we have closed this bug


Note You need to log in before you can comment on or make changes to this bug.