]> git.ipfire.org Git - thirdparty/dhcpcd.git/commit
BSD: Fix UP/DOWN for interfaces which dont' report media changes
authorRoy Marples <roy@marples.name>
Mon, 14 Jan 2019 12:57:37 +0000 (12:57 +0000)
committerRoy Marples <roy@marples.name>
Mon, 14 Jan 2019 12:57:37 +0000 (12:57 +0000)
commit751efa515f8c1000f2bda9023bff7a8f80761db3
tree987dc9e1dea9dd9039ee54fe4965f36cff368218
parentca9f7f084f3be88c83fa6f346ac5cccc20ebe80b
BSD: Fix UP/DOWN for interfaces which dont' report media changes

Carrier UP/DOWN state is handled by media change events on BSD.
When the carrier state changes, it's always to LINK_STATE_DOWN or
LINK_STATE_UP.
If we receive LINK_STATE_UNKNOWN from RTM_IFINFO it means the
interface doesn't change media change events and as such won't
report carrier state changes. In this instance, we can only rely
on IFF_UP being set, which is the same condition dhcpcd needs
for LINK_STATE_UP.
src/if-bsd.c