Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Apr 2012 07:17:49 +1000
From:      Peter Jeremy <peterjeremy@acm.org>
To:        freebsd-net@freebsd.org
Subject:   dhclient behaviour on link status changes
Message-ID:  <20120404211749.GA16579@server.vk2pj.dyndns.org>

next in thread | raw e-mail | index | archive | help

--17pEHd4RhPHOinZp
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

/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?

--=20
Peter Jeremy

--17pEHd4RhPHOinZp
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iEYEARECAAYFAk98un0ACgkQ/opHv/APuIeligCggIjN53HW/xbzhvj+0vC+9kSR
L1UAoIpa2SlQ2gKVUJ8vdZ30oy6zQGoX
=Zaha
-----END PGP SIGNATURE-----

--17pEHd4RhPHOinZp--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120404211749.GA16579>