From owner-freebsd-current@FreeBSD.ORG Sun Sep 7 11:20:45 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 553C216A4BF for ; Sun, 7 Sep 2003 11:20:45 -0700 (PDT) Received: from sizone.org (mortar.sizone.org [65.126.154.242]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D59443FE3 for ; Sun, 7 Sep 2003 11:20:44 -0700 (PDT) (envelope-from dgilbert@daveg.ca) Received: by sizone.org (Postfix, from userid 66) id 16FA32FEE2; Sun, 7 Sep 2003 14:20:43 -0400 (EDT) Received: by canoe.dclg.ca (Postfix, from userid 101) id D7AFE1D1C47; Sun, 7 Sep 2003 14:20:39 -0400 (EDT) From: David Gilbert MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16219.30455.762472.264053@canoe.dclg.ca> Date: Sun, 7 Sep 2003 14:20:39 -0400 To: "M. Warner Losh" In-Reply-To: <20030905.133003.52134645.imp@bsdimp.com> References: <18850000.1062771730@lerlaptop.iadfw.net> <20030905.133003.52134645.imp@bsdimp.com> X-Mailer: VM 7.14 under 21.4 (patch 12) "Portable Code" XEmacs Lucid cc: freebsd-current@freebsd.org cc: ler@lerctr.org Subject: Re: devd *NOT* called on wi0 insert? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2003 18:20:45 -0000 >>>>> "M" == M Warner Losh writes: M> In message: <18850000.1062771730@lerlaptop.iadfw.net> Larry M> Rosenman 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================