Bug 1169874

Summary: ip rule command allows to remove rule with priority 0
Product: Red Hat Enterprise Linux 7 Reporter: Jaroslav Aster <jaster>
Component: iprouteAssignee: Pavel Šimerda (pavlix) <psimerda>
Status: CLOSED ERRATA QA Contact: Jaroslav Aster <jaster>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: thozza
Target Milestone: rcKeywords: Documentation
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: iproute-3.10.0-41.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-19 14:39:41 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:
Bug Depends On:    
Bug Blocks: 1110700, 1191021, 1205796    

Description Jaroslav Aster 2014-12-02 15:23:16 UTC
Description of problem:

ip rule command allows to remove rule with priority 0, but manpage ip-rule says that it is not possible.

Rule 0 is special. It cannot be deleted or overridden.


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

iproute-3.10.0-21.el7


How reproducible:

Always.


Steps to Reproduce:

# ip rule show
0:      from all lookup local 
32766:  from all lookup main 
32767:  from all lookup default 

# ip rule del prio 0

# ip rule show
32766:  from all lookup main 
32767:  from all lookup default 


Actual results:

Rule with prio 0 can be removed.


Expected results:

Rule with prio 0 cannot be removed or manpage ip-rule has to be changed.


Additional info:

Comment 2 Pavel Šimerda (pavlix) 2015-04-07 21:20:55 UTC
This apparently applies to upstream manpage as well.

Comment 3 Pavel Šimerda (pavlix) 2015-04-08 13:38:48 UTC
We're going to talk to upstream and have this fixed in one way or another there first.

Comment 4 Pavel Šimerda (pavlix) 2015-04-08 20:35:28 UTC
I believe it is up to the kernel to decide whether a rule can be removed or not. Maybe it was misdocumented from the begining, maybe there was a change in the kernel. I would personally just remove the line.

Comment 5 Pavel Šimerda (pavlix) 2015-04-13 14:59:23 UTC
Posted upstream as part of a larger documentation patch.

http://marc.info/?l=linux-netdev&m=142893422717620&w=2

Comment 8 Jaroslav Aster 2015-05-13 13:29:47 UTC
Hi Pavel,

I tested it on rhel6 and there is not possible to remove rule with prio 0.

# rpm -q iproute
iproute-2.6.32-45.el6.x86_64

# uname -r
2.6.32-504.el6.x86_64

# ip rule del prio 0
RTNETLINK answers: Operation not permitted

So there is true that rule with prio 0 is special.

I agree that it is a documentation issue.

Comment 12 errata-xmlrpc 2015-11-19 14:39:41 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2117.html