Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1036534

Summary: ip neigh flush does not work
Product: Red Hat Enterprise Linux 6 Reporter: Hangbin Liu <haliu>
Component: iprouteAssignee: Pavel Šimerda (pavlix) <psimerda>
Status: CLOSED NOTABUG QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.6CC: haliu
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-15 10:14:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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