Bug 1276710

Summary: Command 'ip n show' does not show items with NUD noarp or none
Product: Red Hat Enterprise Linux 7 Reporter: Jaroslav Aster <jaster>
Component: iprouteAssignee: Phil Sutter <psutter>
Status: CLOSED NOTABUG QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1276724 (view as bug list) Environment:
Last Closed: 2015-11-03 10:55:43 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 Jaroslav Aster 2015-10-30 15:11:37 UTC
Description of problem:

If I change NUD to noarp or none, the item is not shown by command 'ip n show', but item still exists and I can work with it.


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

iproute-3.10.0-54.el7
iproute-3.16.0-4.fc22

How reproducible:

100%

Steps to Reproduce:

# ip l add test-iface type dummy
# ip l set dev test-iface up
# ip n show dev test-iface
# ip n add 192.168.100.2 lladdr 00:c0:7b:7d:00:c9 dev test-iface nud permanent
# ip n show dev test-iface
192.168.100.2 lladdr 00:c0:7b:7d:00:c9 PERMANENT
# ip n change 192.168.100.2 dev test-iface nud noarp
# ip n show dev test-iface
# ip n add 192.168.100.2 lladdr 00:c0:7b:7d:00:c9 dev test-iface nud permanent
RTNETLINK answers: File exists
# ip n change 192.168.100.2 dev test-iface nud permanent
# ip n show dev test-iface
192.168.100.2 lladdr 00:c0:7b:7d:00:c9 PERMANENT
# ip l del test-iface

The similar issues is with NUD none, but in this case I can not change only nud state, but item exists. I can only replace all item or change everything.

# ip l add test-iface type dummy
# ip l set dev test-iface up
# ip n show dev test-iface
# ip n add 192.168.100.2 lladdr 00:c0:7b:7d:00:c9 dev test-iface nud permanent
# ip n show dev test-iface
192.168.100.2 lladdr 00:c0:7b:7d:00:c9 PERMANENT
# ip n change 192.168.100.2 dev test-iface nud none
# ip n show dev test-iface
# ip n add 192.168.100.2 lladdr 00:c0:7b:7d:00:c9 dev test-iface nud permanent
RTNETLINK answers: File exists
# ip n change 192.168.100.2 dev test-iface nud permanent
RTNETLINK answers: Invalid argument
# ip n change 192.168.100.2 lladdr 00:c0:7b:7d:00:c9 dev test-iface nud permanent
# ip n show dev test-iface
192.168.100.2 lladdr 00:c0:7b:7d:00:c9 PERMANENT
# ip n change 192.168.100.2 dev test-iface nud none
# ip n replace 192.168.100.2 lladdr 00:c0:7b:7d:00:c9 dev test-iface nud permanent
# ip n show dev test-iface
192.168.100.2 lladdr 00:c0:7b:7d:00:c9 PERMANENT
# ip l del test-iface

Actual results:

Items with noarp or none are not shown.

Expected results:

Items are shown.

Additional info:

Comment 2 Jaroslav Aster 2015-11-03 10:55:43 UTC
My fault, this is not bug. I can not read :-(.

nud NUD_STATE
              only list neighbour entries in this state.  NUD_STATE takes values listed below or the special value all which means all states.  This option may occur more than once.  If this option is
              absent, ip lists all entries except for none and noarp.