From owner-freebsd-current@FreeBSD.ORG Thu Sep 29 04:38:30 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 682C016A41F for ; Thu, 29 Sep 2005 04:38:30 +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 096D343D49 for ; Thu, 29 Sep 2005 04:38:29 +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 j8T4cSRa001434; Wed, 28 Sep 2005 21:38:28 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j8T4cS4w001433; Wed, 28 Sep 2005 21:38:28 -0700 Date: Wed, 28 Sep 2005 21:38:28 -0700 From: Brooks Davis To: "M. Warner Losh" Message-ID: <20050929043828.GA27416@odin.ac.hmc.edu> References: <20050928200243.GA16219@odin.ac.hmc.edu> <20050928.171417.74728660.imp@bsdimp.com> <20050928235033.GA13616@odin.ac.hmc.edu> <20050928.215255.89131771.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6c2NcOVqGQ03X4Wi" Content-Disposition: inline In-Reply-To: <20050928.215255.89131771.imp@bsdimp.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: current@freebsd.org Subject: Re: [brooks@FreeBSD.ORG: [src] cvs commit: src/etc pccard_ether] 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: Thu, 29 Sep 2005 04:38:30 -0000 --6c2NcOVqGQ03X4Wi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 28, 2005 at 09:52:55PM -0600, M. Warner Losh wrote: > In message: <20050928235033.GA13616@odin.ac.hmc.edu> > Brooks Davis writes: > : On Wed, Sep 28, 2005 at 05:14:17PM -0600, Warner Losh wrote: > : > > I've just committed the following change to /etc/pccard_ether. I t= hink > : > > it's the right solution, but I'm concerned it may cause problems wi= th > : > > drivers that incorrectly frob the IFF_UP flag themselves. If so it= may > : > > be nessicary to revert this change temporarily or at least not MFC = it. > : >=20 > : > This change converts the "I already have an address" check to be a > : > "I'm up" which are two different things. dhclient leaves the > : > interface up when it exits, even if it can't get an address. I think > : > that might cause a lot of problems for people. I originally had this > : > test in pccard_ether, but changed it to checking for netmask because > : > roving from network to network didn't work without it on my laptop > : > with multiple network interfaces. > :=20 > : I don't think dhclient's behavior will have any effect in the normal > : case. "pccard_ether start" is only called on attach. It is not > : involved in any with the link state transitions caused by roving since > : those should not happen until after attach. The one POLA violation I > : can see is that you probably can't manually run pccard_ether's start > : mode twice without performing a stop first. >=20 > notify 0 { > match "system" "IFNET"; > match "type" "LINK_UP"; > media-type "802.11"; > action "/etc/rc.d/dhclient start $subsystem"; > }; >=20 > was the case I was worried about, but I think that since it calls > dhclient directly, we should be OK. >=20 > The original check was supposed to be there as a short-circuit. We > called pccard_ether for *ALL* devices in the system when devd > started. We didn't want it to do anything if the link had already > been configured earlier in the boot process. Hence the check for a > netmask. There were many scripts around that put wireless devices > (esp ndis) into the 'up' state before calling pccard_ether so that it > would associate with the AP. It would then be in the 'UP' state, but > have no address. >=20 > Eg, you've broken: >=20 > ifconfig ndis0 ssid fred up > /etc/pccard_ether ndis0 start This change does break that case. Wacking the interface into the up state before running pccard_either should now be unnecessicary because I always to it as part of he invocation of /etc/rc.d/netif (there might be an issue with IPv6 only systems, but its easily fixed). Scripts that try various ssids should be obsoleted by wpa_supplicant.conf so I think that while this does change behavior it only removes certain uses that can be handled other ways. If people find this change truly objectionable I will back it out, but I'd really rather not without evidence of problems that can't be easily worked around. Our interface setup process needs to continue to evolve if we're going to adapt to modern hardware and networks. -- 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 --6c2NcOVqGQ03X4Wi Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFDO2/CXY6L6fI4GtQRAnx/AKDaOJTJZ+7WxUSaDMYnyaG4CLntLQCgwHad AX3I+zglw7hRgG6qz4dnIYA= =Alda -----END PGP SIGNATURE----- --6c2NcOVqGQ03X4Wi--