Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Sep 2003 14:20:39 -0400
From:      David Gilbert <dgilbert@dclg.ca>
To:        "M. Warner Losh" <imp@bsdimp.com>
Cc:        ler@lerctr.org
Subject:   Re: devd *NOT* called on wi0 insert?
Message-ID:  <16219.30455.762472.264053@canoe.dclg.ca>
In-Reply-To: <20030905.133003.52134645.imp@bsdimp.com>
References:  <18850000.1062771730@lerlaptop.iadfw.net> <20030905.133003.52134645.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
>>>>> "M" == M Warner Losh <imp@bsdimp.com> writes:

M> In message: <18850000.1062771730@lerlaptop.iadfw.net> Larry
M> Rosenman <ler@lerctr.org> writes: : I have a (within the week)
M> -CURRENT system.  If I boot with my Linksys : WPC11 V.3 card
M> inserted : I get the dhcp actions and all is fine.  If I remove the
M> card, we don't : kill off dhclient.  : : If I boot without the

Actually, I think devd needs to be significantly smarter.  Consider
the average laptop: one or more permanent interfaces and one or more
transient interfaces.

Currently, if bge0 (my permanent interface) has link at boot, it gets
dhclient.  Similarly to the origional poster, if wi0 is inserted at
boot, it gets dhclient.

devd doesn't seem to do much else.

There is a caveat, of course.  You can't run multiple copies of
dhclient (say one for each interface).  This is broken.  You must, in
fact, run one copy of dhclient listing all the interfaces to
configure.  This is contrary (say) to moused ... which works well with
multiple mice.

Ideally, you would start dhclient on an interface when it had link and
stop it when it lost link.  You might want to put a 10 or 15 second
timeout on that (as it could be annoying with a flakey controller),
but this makes sense.  In this case, devd would not only have to watch
changes to the device tree, but device state transitions.

Less ideally, dhclient should run on all capable interfaces whenever
they're present.  In the current scheme, this requires some external
smarts as you must kill off the current dhclient and restart it with a
new list of interfaces.

Dave.

-- 
============================================================================
|David Gilbert, Independent Contractor.       | Two things can only be     |
|Mail:       dave@daveg.ca                    |  equal if and only if they |
|http://daveg.ca                              |   are precisely opposite.  |
=========================================================GLO================



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