From owner-freebsd-current@FreeBSD.ORG Mon Aug 1 17:17:50 2005 Return-Path: X-Original-To: current@freebsd.org 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 EBF6016A420 for ; Mon, 1 Aug 2005 17:17:49 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E7F243D70 for ; Mon, 1 Aug 2005 17:17:42 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id j71HHcDu018088; Mon, 1 Aug 2005 10:17:38 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j71HHcrf018087; Mon, 1 Aug 2005 10:17:38 -0700 Date: Mon, 1 Aug 2005 10:17:38 -0700 From: Brooks Davis To: Sam Leffler Message-ID: <20050801171738.GB1377@odin.ac.hmc.edu> References: <42EAD325.60707@errno.com> <20050801152156.GB90588@teardrop.org> <42EE41A7.4020100@errno.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hQiwHBbRI9kgIhsi" Content-Disposition: inline In-Reply-To: <42EE41A7.4020100@errno.com> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: James Snow , current@freebsd.org Subject: Re: dhclient and wpa_supplicant X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 01 Aug 2005 17:17:50 -0000 --hQiwHBbRI9kgIhsi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 01, 2005 at 08:37:11AM -0700, Sam Leffler wrote: > James Snow wrote: > >On Fri, Jul 29, 2005 at 06:08:53PM -0700, Sam Leffler wrote: > > > >>So the question is what are the outstanding issues with dhclient and=20 > >>wpa_supplicant? I'm mostly concerned with wireless devices but feel=20 > >>free to talk about wired interfaces too. =20 > > > > > >My biggest outstanding complaint is when booting with a wired network > >and no present wireless network, if dhclient has any recorded leases for > >the wireless interface, it will attempt to use the most recent one and > >blows away the default gateway for the wired network. I then have to=20 > >manually > >'netif stop ath0' and 'netif restart em0.' >=20 > This sounds similar to Peter's desire for a priority to use in selecting= =20 > which interface gets the default route. I've suggested to him this can= =20 > be implemented in the dhclient-hooks script or similar. >=20 > > > >Not sure what the best solution is. Perhaps dhclient needs to be aware > >of the associated/unassociated status of a wireless interface in the > >same way that it's aware of the link status of a wired interface? >=20 > It sounds like you want one dhclient process to be aware of what happens= =20 > in another dhclient process. In handling global state like the default= =20 > route and dns this is important but I'm trying to get it out of the=20 > dhclient program because it's a policy decision. Instead I want to see= =20 > it somewhere that people can override if the default policy isn't right= =20 > for them. I have some ideas in this area. I'm planning to modify dhclient-script to use rc.conf variables and then start adding additional functionality including a concept of interface (and maybe network) priorities for default routes. This is an area that needs more thinking on. I'd personally like to see us find ways to support multiple automatic configuration methods including the static probing supported by profile.sh. > >>If something doesn't work right please try to give steps to reproduce > >>the problem. > > > > > >In /etc/rc.conf: > > > >ifconfig_WIRED=3D"DHCP" > >ifconfig_WIRELESS=3D"WPA DHCP" > > > >Boot once in the presence of a wireless network. Now reboot with a wired > >network, but no present wireless network. dhclient will obtain a lease > >for the wired interface, and when dhclient launches on the wireless > >interface it will time out, use the recorded lease, and clobber the > >wired default gateway. >=20 > That seems wrong; we'll look into it. I believe the bug here is that when attached to an interface where wpa_supplicant is running, but the interface is not associated, dhclient should wait for association for ten seconds like it does with wired interfaces and then exit. At the moment it seems to be confused and think there's link some times. It doesn't seem to happen all the time for me, but I'm not 100% sure of that. If it is sporadic, I'd tend to think scan_ssid=3D1 support might be the culprit. -- Brooks --=20 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 --hQiwHBbRI9kgIhsi Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFC7lkxXY6L6fI4GtQRAltbAKCFX2YDsqLgtrgc2eXd64p3hIbkhgCgwD2h DMdbSSDj5ZJFZ1vaw9hv+jI= =CD+F -----END PGP SIGNATURE----- --hQiwHBbRI9kgIhsi--