]> git.ipfire.org Git - thirdparty/dhcpcd.git/commit
BSD: Detect initial link state in ifa_data
authorRoy Marples <roy@marples.name>
Tue, 22 Sep 2020 12:09:03 +0000 (13:09 +0100)
committerRoy Marples <roy@marples.name>
Tue, 22 Sep 2020 12:09:03 +0000 (13:09 +0100)
commit0ede9e5419b798ae5ed183ca7da7986b8d4419bd
treeb009feff69e39b125f76f361174635b6e2877b14
parent96bf083104435f38e06375fbaa094ab50626b5de
BSD: Detect initial link state in ifa_data

Not all interfaces report media state to get the link state.
However, link state is available from getifaddrs(3) ifa_data
for AF_LINK addresses.

Testing shows that link state is also sent correctly via
route(4) messages for the same interface.

This makes pppoe(4) interfaces more reliable on FreeBSD and OpenBSD.
src/if-bsd.c
src/if-linux.c
src/if-sun.c
src/if.c
src/if.h