Bug 1169874 - ip rule command allows to remove rule with priority 0
Summary: ip rule command allows to remove rule with priority 0
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: iproute
Version: 7.1
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Pavel Šimerda (pavlix)
QA Contact: Jaroslav Aster
Depends On:
Blocks: 1205796 1110700 1191021
TreeView+ depends on / blocked
Reported: 2014-12-02 15:23 UTC by Jaroslav Aster
Modified: 2015-11-19 14:39 UTC (History)
1 user (show)

Fixed In Version: iproute-3.10.0-41.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-11-19 14:39:41 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2117 normal SHIPPED_LIVE iproute bug fix and enhancement update 2015-11-19 11:35:06 UTC

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):


How reproducible:


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.


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

# uname -r

# 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.


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