diff options
| author | Roy Marples <roy@marples.name> | 2020-09-22 13:09:03 +0100 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-09-22 13:09:03 +0100 |
| commit | 0ede9e5419b798ae5ed183ca7da7986b8d4419bd (patch) | |
| tree | b009feff69e39b125f76f361174635b6e2877b14 /src/if.c | |
| parent | 96bf083104435f38e06375fbaa094ab50626b5de (diff) | |
| download | dhcpcd-0ede9e5419b798ae5ed183ca7da7986b8d4419bd.tar.xz | |
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.
Diffstat (limited to 'src/if.c')
| -rw-r--r-- | src/if.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -684,7 +684,7 @@ if_discover(struct dhcpcd_ctx *ctx, struct ifaddrs **ifaddrs, #endif ifp->active = active; - ifp->carrier = if_carrier(ifp); + ifp->carrier = if_carrier_ifadata(ifp, ifa->ifa_data); TAILQ_INSERT_TAIL(ifs, ifp, next); } |
