• David Ahern's avatar
    ip: Add type and master filters to brief output · 84d30afd
    David Ahern authored
    The brief format does not honer the master and type filters:
    
    $ ip link show master vrf-mgmt
    7: dummy0: <BROADCAST,NOARP,SLAVE> mtu 1500 qdisc noop master vrf-mgmt state DOWN mode DEFAULT group default qlen 1000
        link/ether 66:39:cc:2b:e9:bd brd ff:ff:ff:ff:ff:ff
    
    $ ip -br link show master vrf-mgmt
    lo               UNKNOWN        00:00:00:00:00:00 <LOOPBACK,UP,LOWER_UP>
    eth0             UP             08:00:27:de:14:c8 <BROADCAST,MULTICAST,UP,LOWER_UP>
    eth1             UP             08:00:27:87:02:f1 <BROADCAST,MULTICAST,UP,LOWER_UP>
    eth2             UP             08:00:27:61:1e:fd <BROADCAST,MULTICAST,UP,LOWER_UP>
    vrf-blue         UNKNOWN        a6:3f:09:34:7e:74 <NOARP,MASTER,UP,LOWER_UP>
    vrf-red          DOWN           fe:a2:2d:e1:bc:ac <NOARP,MASTER>
    dummy0           DOWN           66:39:cc:2b:e9:bd <BROADCAST,NOARP,SLAVE>
    dummy1           DOWN           4a:4f:13:91:64:b1 <BROADCAST,NOARP,SLAVE>
    dummy2           DOWN           b2:4f:b6:cd:bd:a6 <BROADCAST,NOARP>
    dummy3           DOWN           1e:06:3d:40:b8:c2 <BROADCAST,NOARP,SLAVE>
    vrf-mgmt         DOWN           ce:b2:74:41:21:df <NOARP,MASTER>
    
    With this patch the expected output is shown:
    
    $ ip -br link show master vrf-mgmt
    dummy0           DOWN           66:39:cc:2b:e9:bd <BROADCAST,NOARP,SLAVE>
    Signed-off-by: default avatarDavid Ahern <dsa@cumulusnetworks.com>
    84d30afd
ipaddress.c 51.1 KB