]> git.proxmox.com Git - mirror_iproute2.git/commit - ip/iproute.c
iproute: Show default type, table, proto and scope of route
authorMasatake YAMATO <yamato@redhat.com>
Wed, 12 Mar 2014 03:46:53 +0000 (12:46 +0900)
committerStephen Hemminger <stephen@networkplumber.org>
Fri, 21 Mar 2014 21:21:26 +0000 (14:21 -0700)
commit577e5a53fc7731468f18f74fcbda5090691c48cb
treebb3d378cfa38ee7e8ebd366164ab6560ec7f24f4
parent4d4da09e0036107e7c49362b38df220e9a2f7b12
iproute: Show default type, table, proto and scope of route

In "ip route show" output unicast type, main table, boot protocol and
universe scope are hidden as default labels.

Sometimes it is helpful to show the hidden label for people not enough
familiar with routing subsystem to map the output of "ip route show" and
kernel source code.

With this patch "ip route show" with -d option shows the default labels.

Example of difference of output with -d option:

    $ ./ip/ip -4   route show table all dev virbr1
    ...
    192.168.121.0/28  proto kernel  scope link  src 192.168.121.1
    ...
    $ ./ip/ip -4 -d  route show table all dev virbr1
    ...
    unicast 192.168.121.0/28  table main  proto kernel  scope link  src 192.168.121.1
    ...

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
ip/iproute.c