]> git.puffer.fish Git - mirror/frr.git/commit
zebra: don't log errors on unsupported medias 3419/head
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Wed, 5 Dec 2018 19:22:56 +0000 (17:22 -0200)
committerRafael Zalamena <rzalamena@opensourcerouting.org>
Wed, 5 Dec 2018 19:22:56 +0000 (17:22 -0200)
commitc69f2c1fffbae8d0bd5b69c627c4217d6ce97aed
tree065343b631775d64def467abd8d8c2e8adfa7713
parent86c57af534173d417189404ae005a610d84ee155
zebra: don't log errors on unsupported medias

When using `SIOCGIFMEDIA` check for `EINVAL`, otherwise we might print
an error message on an unsupported interface.

FreeBSD source code reference:
https://github.com/freebsd/freebsd/blob/master/sys/net/if_media.c#L300

And:
https://github.com/freebsd/freebsd/blob/8cb4b0c0181bd45318ee8977f77aea90c53bb224/usr.sbin/rtsold/if.c#L211

  /*
   * EINVAL simply means that the interface does not support
   * the SIOCGIFMEDIA ioctl. We regard it alive.
   */

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
zebra/ioctl.c