/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

Attachment: pgpBpISxeP8qg.pgp
Description: PGP signature

Reply via email to