]> git.puffer.fish Git - matthieu/frr.git/commit
zebra: ifi_link_state is the link state
authorRoy Marples <roy@marples.name>
Mon, 12 Oct 2020 19:53:14 +0000 (20:53 +0100)
committerRoy Marples <roy@marples.name>
Tue, 13 Oct 2020 10:32:36 +0000 (11:32 +0100)
commit98f3df554bffc3d222c9a2d220b9896a29af4123
treebf4bb4398887d54b5ce1af2eabd0a034f2dbdab6
parent7563bd3fd8865caf20f803e360db2974b34136b2
zebra: ifi_link_state is the link state

SIOCGIFMEDIA returns the media state.
SIOCGIFDATA returns interface data which includes the link state.

While the status of the former is usually indicitive of the latter,
this is not always the case.
Ifact some recent net80211 changes in at least NetBSD and OpenBSD
have MONITOR media set to active but the link status set to DOWN.

All interfaces will return link state with SIOCGIFDATA, unlike
SIOCGIFMEDIA. However not all BSD's support SIOCGIFDATA - it has
recently been accepted into FreeBSD-13.
However, all BSD's do report the same structure in ifa_data for
AF_LINK addresses from getifaddrs(3) so the information has always
been available.

Signed-off-by: Roy Marples <roy@marples.name>
zebra/ioctl.c