HEADSUP: OpenBSD dhclient incoming

Brooks Davis brooks at one-eyed-alien.net
Wed Jun 15 06:10:19 GMT 2005


On Wed, Jun 15, 2005 at 07:42:48AM +0400, Vladimir Grebenschikov wrote:
> ? ??, 14/06/2005 ? 20:57 -0400, Matthew Emmerton ?????:
> > On Tue, 14 Jun 2005, Brooks Davis wrote:
> > 
> > > On Tue, Jun 14, 2005 at 10:01:45AM +0400, Vladimir Grebenschikov wrote:
> > >> ? ??, 06/06/2005 ? 20:46 -0700, Brooks Davis ?????:
> > >>> I'm about to start importing the OpenBSD dhclient and required
> > >>> support in /etc.  I will unhook dhclient from the build while I work so
> > >>> there shouldn't be much breakage for most people
> > >>
> > >> I have strange behavior of new dhclient + devd:
> > >>
> > >> just after boot (with ethernet plugged) I have no devd events about
> > >> state of media and have interface down, but after first ifconfig (even
> > >> without parameters, even executed by any user) "link state chages to UP"
> > >> event appears and devd starts dhclient on interface.
> > >>
> > >> I do not think that it is desired behavior.
> > >>
> > >> my rc.conf, related to this:
> > >>
> > >> ifconfig_fxp0="dhcp"
> > >> network_interfaces="lo0"
> > >> devd_enable="YES"
> > >>
> > >> Probably I need to comment network_interfaces line, but anyway, now it
> > >> works strange.
> > 
> > Shouldn't you have network_interfaces="lo0 fxp0" in order for the rc 
> > scripts to run the appropriate ifconfig or dhclient command for each 
> > interface?
> 
> Probably yes (it works), but why first /sbin/ifconfig, issued by uid!=0
> triggers dhclient ?
> 
> I think behavior should be consistent, either rc.d/netif relay only on
> devd events and does not depends on network_interfaces= or rc.d/netif
> should relay on network_interfaces= and ignore not mentioned interfaces.
> 
> Also devd's IFUP event should not depend on user's /bin/ifconfig issued
> (or not issued) by hands.

There are two issues here.  First, if we're going to keep
network_interfaces around, /etc/rc.d/dhclient should honor it and
not start dhclient on interfaces not in either network_interfaces or
removable interfaces.  Second, running ifconfig should not be triggering
link events.  That makes no sense.  I'll have to see if can replicate
that, I'm a bit dubious.

-- Brooks

-- 
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20050614/5e63b7f5/attachment.bin


More information about the freebsd-current mailing list