Bug 1221185

Summary: ip rule list does not allow selectors and shows incorrect usage
Product: Red Hat Enterprise Linux 7 Reporter: Jaroslav Aster <jaster>
Component: iprouteAssignee: Phil Sutter <psutter>
Status: CLOSED ERRATA QA Contact: Marek Marusic <mmarusic>
Severity: low Docs Contact:
Priority: low    
Version: 7.2CC: jaster, kzhang, mmarusic, ovasik, rkhan
Target Milestone: rcKeywords: Documentation, Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1359218 (view as bug list) Environment:
Last Closed: 2016-11-03 23:32:56 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: 1359218    

Description Jaroslav Aster 2015-05-13 12:54:27 UTC
Description of problem:

ip rule list does not allow selectors and shows incorrect usage.


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

iproute-3.10.0-26


How reproducible:

always


Steps to Reproduce:

# ip rule add from 172.29.0.0/24 to 172.29.1.0/24 table 1110

# ip rule show
0:      from all lookup local 
32765:  from 172.29.0.0/24 to 172.29.1.0/24 lookup 1110 
32766:  from all lookup main 
32767:  from all lookup default

# ip rule list
0:      from all lookup local 
32765:  from 172.29.0.0/24 to 172.29.1.0/24 lookup 1110 
32766:  from all lookup main 
32767:  from all lookup default 

# ip rule list from 172.29.0.0/24
"ip rule show" does not take any arguments.

# ip rule help
Usage: ip rule [ list | add | del | flush ] SELECTOR ACTION

man ip-rule:

ip rule  [ list | add | del | flush ] SELECTOR ACTION

There is no show command and selectors are allowed for list. It is a little bit confusing.

I think it is not a functional mistake of ip route (selectors for list command would be useful), it is just documentation problem (man page, help).

Comment 1 Pavel Šimerda (pavlix) 2015-05-20 18:14:37 UTC
So what are your expectations regarding selectors? Are they part of the bug report?

Comment 2 Jaroslav Aster 2015-05-21 09:08:55 UTC
Hi Pavel,

I expect consistency. There are two ways how to do it. The first, you can change documentation (help and man page) and the second, you can change the code and add new functionality. It is up to you which way will be chosen.

If you choose second, the selectors should be the same as they are for the other command.

# ip rule add from 192.168.1.0/24 lookup 3
# ip rule add from 192.168.2.0/24 lookup 3
# ip rule list lookup 3

I expect that last command will show me all rules where lookup is 3.

Comment 3 Pavel Šimerda (pavlix) 2015-07-07 15:53:42 UTC
Will fix the docs for now.

Comment 6 Phil Sutter 2016-03-07 19:51:14 UTC
This will be fixed as part of bug 1251186.

*** This bug has been marked as a duplicate of bug 1251186 ***

Comment 11 errata-xmlrpc 2016-11-03 23:32:56 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/RHEA-2016-2162.html