Bug 1042802 - backport: ip -d monitor link is not as verbose as ip -d link
Summary: backport: ip -d monitor link is not as verbose as ip -d link
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: iproute
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Pavel Šimerda (pavlix)
QA Contact: Jaroslav Aster
URL:
Whiteboard:
Depends On: 1042804
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-13 12:22 UTC by Antoni Segura Puimedon
Modified: 2015-11-19 14:40 UTC (History)
5 users (show)

Fixed In Version: iproute-3.10.0-40.el7
Doc Type: Enhancement
Doc Text:
Clone Of: 1042799
Environment:
Last Closed: 2015-11-19 14:40:57 UTC
Target Upstream Version:


Attachments (Terms of Use)


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

Internal Links: 1042799 1155116

Description Antoni Segura Puimedon 2013-12-13 12:22:06 UTC
+++ This bug was initially created as a clone of Bug #1042799 +++

Description of problem:
In the output of "ip -d -o link show" and "ip -d -o monitor link" vlan and
macvlan devices are reported with the following form:
"device name" + "@" + "device name of the underlying device".

Since it is perfectly legal for another device to include symbols in their
names, e.g., "@", it is perfectly possible to have a dummy device called:
p1p3.13@p1p3

and a vlan device called p1p3.13 that is being reported as
p1p3.13@p1p3

In the output of "ip -d -o link show" this is disambiguable thanks to the fact
that dummies, vlans and macvlans have their type shown in the final segment:

    21: p1p3.13@p1p3: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN \    link/ether 00:10:18:e1:6c:f4 brd ff:ff:ff:ff:ff:ff\    vlan id 13 <REORDER_HDR>
    23: p1p3.13@p1p3: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN \    link/ether 82:17:ed:f9:e8:f3 brd ff:ff:ff:ff:ff:ff\    dummy 

However, the output of "ip -d -o monitor link" doesn't include the type
information for any device (not even for just vlanned and dummy types like
"ip -d -o link show" does). E.g.:
    23: p1p3.13@p1p3: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN \    link/ether c2:01:5c:db:bd:39 brd ff:ff:ff:ff:ff:ff
    21: p1p3.13@p1p3: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN \    link/ether 00:10:18:e1:6c:f4 brd ff:ff:ff:ff:ff:ff

Without a priori knowledge (having executed before a detailed link show and
keeping a database by interface index) there is no way to tell that the former
is a dummy and the latter is the vlan.

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


How reproducible: 100%


Steps to Reproduce:
1. start the monitor "ip -d -o monitor link"
2. Create vlan 13 over a nic (for example named p1p3)
3. Create a dummy called "p1p3.13@p1p3"
4. Check the detailed link monitor output

Actual results:
    23: p1p3.13@p1p3: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN \    link/ether c2:01:5c:db:bd:39 brd ff:ff:ff:ff:ff:ff
    21: p1p3.13@p1p3: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN \    link/ether 00:10:18:e1:6c:f4 brd ff:ff:ff:ff:ff:ff


Expected results:
    23: p1p3.13@p1p3: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN \    link/ether c2:01:5c:db:bd:39 brd ff:ff:ff:ff:ff:ff\    dummy 
    21: p1p3.13@p1p3: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN \    link/ether 00:10:18:e1:6c:f4 brd ff:ff:ff:ff:ff:ff\    vlan id 13 <REORDER_HDR>

Comment 3 Pavel Šimerda (pavlix) 2014-10-10 19:56:34 UTC
Reproduced it with upstream git:

Terminal #1:

# ip monitor

Terminal #2:

# ip link add d1 type dummy
# ip link add link d1 v1 type vlan id 13

Output (terminal #1):

13: d1: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default 
    link/ether 9a:ca:f9:40:76:13 brd ff:ff:ff:ff:ff:ff
13: d1: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default 
    link/ether 9a:ca:f9:40:76:13 brd ff:ff:ff:ff:ff:ff
14: v1@d1: <BROADCAST,NOARP,M-DOWN> mtu 1500 qdisc noop state DOWN group default 
    link/ether 9a:ca:f9:40:76:13 brd ff:ff:ff:ff:ff:ff

Additional info:

Neither "-d" nor "-o" seem to be documented in the manual pages.

Comment 5 Pavel Šimerda (pavlix) 2015-06-04 12:04:53 UTC
Upstream works for me.

Comment 11 errata-xmlrpc 2015-11-19 14:40:57 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


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