[Bug 253166] net/dhcpcd: no interfaces have a carrier (during boot)

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Feb 2 13:38:55 UTC 2021


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253166

--- Comment #6 from roy at marples.name ---
The route socket overflow has always been a problem, just fairly invisible
unless you actually know what you're looking for.

The carrier issue has changed fairly recently since dhcpcd-9.3

In a nutshell, carrier is now *only* determined by
ifnet->if_data->ifi_link_state.
It used to use media valid state, but this is problematic for some interface
types who have a separation between valid media vs carrier.

One good example of this is wireless monitor mode.
The interface media is valid, but there is no carrier.

In FreeBSD<13 the only way of accessing ifi_link_state is via routing messages
(which can be lost) or getifaddrs(2) which is an expensive libc call.
FreeBSD-13 has added SIOCGIFDATA which is much more light weight.
https://reviews.freebsd.org/D26538

I *could* poll this ioctl every second at the expense of CPU to detect carrier
state changes or FreeBSD *could* actually commit something to detect overflow.
Currently it's the only major BSD that doesn't report this for the routing
socket.
dhcpcd used to poll for carrier up only (via media state), but I got complaints
that it used too much CPU or was too slow or just didn't work reliably so I
removed it. I'm in a no-win situation right now :(

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list