]> git.puffer.fish Git - mirror/frr.git/commit
zebra: Modify how we display/store os description 4220/head
authorDonald Sharp <sharpd@cumulusnetworks.com>
Sat, 27 Apr 2019 23:55:21 +0000 (19:55 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 25 Apr 2019 08:22:43 +0000 (04:22 -0400)
commitba5165ecccdbe1ff5aa1ca0203e389ef2c269df5
tree4fb745732ade02971bcd3d709ac92fbdc948bd83
parente07daf5f999801a1f929b85b9354a0f126526159
zebra: Modify how we display/store os description

The alias/description of an interface in linux was being
used to override the internal description.  As such let's
fix the display to keep track of both if we have it.

Config in FRR:
!
interface docker0
 description another combination
!
interface enp3s0
 description BAMBOOZLE ME WILL YOU
!

Config in linux:
sharpd@robot ~/f/zebra> ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    alias This is the loopback you cabbage
2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 74:d0:2b:9c:16:eb brd ff:ff:ff:ff:ff:ff
    alias HI HI HI

Now the 'show int descr' command:
robot# show int description
Interface       Status  Protocol  Description
docker0         up      down      another combination
enp3s0          up      up        BAMBOOZLE ME WILL YOU
                                  HI HI HI
lo              up      up        This is the loopback you cabbage

Fixes: #4191
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
zebra/if_netlink.c
zebra/interface.c
zebra/interface.h