]> git.proxmox.com Git - mirror_iproute2.git/commit
ip: add error reporting when RTM_GETNSID failed
authorJan Engelhardt <jengelh@inai.de>
Mon, 12 Oct 2020 13:55:55 +0000 (15:55 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 12 Oct 2020 15:10:25 +0000 (08:10 -0700)
commit0ca1312c208a6b4260898dccc59030a85c131b27
tree234dbe3539fe95187436bb50d0641661d549f7dc
parent58c3c55f3888fd2482545dfc902b9cb38458e404
ip: add error reporting when RTM_GETNSID failed

`ip addr` when run under qemu-user-riscv64, fails. This likely is due
to qemu-5.1 not doing translation of RTM_GETNSID calls. Aborting ip
completely is not helpful for the user however. This patch reworks
the error handling.

Before:

rtest:/ # ip a
2: host0@if4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
request send failed: Operation not supported
    link/ether 46:3f:2d:88:3d:db brd ff:ff:ff:ff:ff:ffrtest:/ #

Afterwards:

rtest:/ # ip a
2: host0@if4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
rtnl_send(RTM_GETNSID): Operation not supported. Continuing anyway.
    link/ether 46:3f:2d:88:3d:db brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 192.168.72.147/28 brd 192.168.72.159 scope global host0
       valid_lft forever preferred_lft forever
    inet6 fe80::443f:2dff:fe88:3ddb/64 scope link
       valid_lft forever preferred_lft forever

Signed-off-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
ip/ipnetns.c