dhclient behaviour on link status changes
Peter Jeremy
peterjeremy at acm.org
Wed Apr 4 21:24:04 UTC 2012
/etc/devd.conf includes a rule to start dhclient when an Ethernet or
802.11 interface reports "link up", with a comment: "No link down rule
exists because dhclient automatically exits when the link goes down."
IMHO, this is the desired behaviour, unfortunately it's not the way
dhclient actually behaves. In my experience, dhclient will exit when
the interface goes down but ignores link status changes.
Looking at the source, it seems to exit only when there's no usable
route (by monitoring RTF_UP).
dhclient does monitor the link status using SIOCGIFMEDIA but only at
startup (it will exit if the link doesn't come up within 10s of
dhclient starting) and during DHCP exchanges (if the link goes down
when it's expecting a DHCP response then it exits).
Can anyone explain the rationale behind the current behaviour?
--
Peter Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-net/attachments/20120404/7c2a501b/attachment.pgp
More information about the freebsd-net
mailing list