]> git.proxmox.com Git - mirror_frr.git/commit
zebra: silence harmless ioctl warning when retrieving interface speed
authorRenato Westphal <renato@opensourcerouting.org>
Wed, 2 Jan 2019 18:47:51 +0000 (16:47 -0200)
committerRenato Westphal <renato@opensourcerouting.org>
Wed, 2 Jan 2019 20:18:26 +0000 (18:18 -0200)
commitf767cee4eb80e4f90208daee096c5203a9eb7af4
tree66a73c7f2c6d8a63ec64f5e4763c004df13c0bd5
parentd52fa66f0eab73d73caf5fdb47aeae4132b144db
zebra: silence harmless ioctl warning when retrieving interface speed

zebra uses the SIOCETHTOOL ioctl with the ETHTOOL_GSET command to
fetch the speed of interfaces from the kernel. The only problem is
that ETHTOOL_GSET returns EOPNOTSUPP when the given interface is a
virtual interface. This leads to zebra emitting warnings like this
at startup:

ZEBRA: IOCTL failure to read interface lo speed: 95 Operation not supported
ZEBRA: IOCTL failure to read interface dummy0 speed: 95 Operation not supported
ZEBRA: IOCTL failure to read interface ovs-system speed: 95 Operation not supported

Silence these warnings by ignoring EOPNOTSUPP errors, since we know
they are harmless. This is similar to how we handle EINVAL errors
from the BSD SIOCGIFMEDIA ioctl (commit c69f2c1ff).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
zebra/if_netlink.c