]> git.proxmox.com Git - mirror_iproute2.git/commit - bridge/link.c
utils: Introduce and use get_ifname_rta()
authorSerhey Popovych <serhe.popovych@gmail.com>
Thu, 15 Feb 2018 21:23:22 +0000 (23:23 +0200)
committerDavid Ahern <dsahern@gmail.com>
Fri, 16 Feb 2018 16:14:20 +0000 (08:14 -0800)
commitfcac9665265510735252760b7a0040f9adaa34a2
tree08706477a869cdb10982800931c9e384790230dc
parent0cec58dac4c249a6773a39e00b0f13530534cda7
utils: Introduce and use get_ifname_rta()

Be consistent in handling of IFLA_IFNAME attribute in all places: if
there is no attribute report bug to stderr and use ll_idx_n2a() as
last measure to get name in "if%u" format instead of "<nil>".

Use check_ifname() to validate network device name: this catches both
unexpected return from kernel and ll_idx_n2a().

Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
bridge/link.c
include/utils.h
ip/ipaddress.c
lib/utils.c