Bug 242081

Summary: dhclient doesn't exit on link down event, and devd is only configured to start dhclient on link up.
Product: Base System Reporter: Majdi S. Abbas <msa>
Component: confAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Some People CC: dch, msa, unitrunker
Priority: ---    
Version: 11.3-RELEASE   
Hardware: i386   
OS: Any   

Description Majdi S. Abbas 2019-11-19 13:53:21 UTC
dhclient does not exit when interfaces transition down, it merely unconfigures the last lease on that interface, then sits there.

As devd.conf is only configured to start dhclient on link up events, not restart dhclient if it's running, this causes hosts to fall off the network (dhclient is running but does not do anything but poll() -- there may be a bug in the state machine handling?)

I've been able to work around it for now by adding a devd.conf entry that stops dhclient on link down events, causing the link up start entry to work properly.

Some options:
1) dhclient is fixed to exit correctly (as documented in the man page.)
   - This might be some sort of state machine handling bug that would be worth digging into.
2) devd.conf's link up entry is modified to perform a restart, rather than a start, to allow it to function if dhclient is still running.
3) devd.conf as shipped has a link down entry that stops dhclient.