From owner-freebsd-current@FreeBSD.ORG Thu Sep 1 22:36:38 2005 Return-Path: X-Original-To: freebsd-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 7E7EB16A41F for ; Thu, 1 Sep 2005 22:36:38 +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 1A7F343D45 for ; Thu, 1 Sep 2005 22:36:38 +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 j81MaXw2026573; Thu, 1 Sep 2005 15:36:33 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j81MaXUw026571; Thu, 1 Sep 2005 15:36:33 -0700 Date: Thu, 1 Sep 2005 15:36:33 -0700 From: Brooks Davis To: Jon Dama Message-ID: <20050901223633.GF4108@odin.ac.hmc.edu> References: <20050901212645.BE5615D07@ptavv.es.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="65ImJOski3p8EhYV" Content-Disposition: inline In-Reply-To: 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: Jochen Gensch , freebsd-current@freebsd.org Subject: Re: Default route doesn't change to wireless device (ath0) 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, 01 Sep 2005 22:36:38 -0000 --65ImJOski3p8EhYV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 01, 2005 at 02:43:57PM -0700, Jon Dama wrote: > If the start_if.ath0 script isn't running, you should check that you have > removable_interfaces=3D"ath0" in rc.conf. Though, I saw some traffic that > say this was going away. Yup, it's dying. > Anyway, quoting Brooks in "HEADSUP: OpenBSD dhclient incoming" > "Second the pccard_ifconfig variable is only used as a default value for > interfaces that are on the removable_interfaces list, but do not have an > ifconfig_ variable. Third, interfaces must be on the > removable_interfaces list for pccard_ether to work." This is now wrong. I've nuked the pccard_ifconfig and added an ifconfig_DEFAULT variable which applies to all interfaces that don't have ifconfig_ variables (actually, it applies to those with empty ones as well at this point which is probably a bug.) > There should not be a need to modify devd.conf as there is already this > line: >=20 > attach 0 { > device-name "$ethernet-nic-regex"; > action "/etc/pccard_ether $device-name start"; > } >=20 > The regex does cover ath0, and pccard_ether should handle the event if the > interface is listed in removable_interfaces We've actually done away with the regex in HEAD and are using interface types so anything should work now. > I also saw some traffic from Brooks where he explicitly stated that > the new dhclient does not touch the default route if one is already > configured. afaik, this should not actually be a problem because start_if > is always run before dhclient has a change to start. Also I agree, it > would rather dangerous if dhclient just started flushing the routing > table. If you want to forcably set the default route via dhclient, you can do it via /etc/dhclient-exit-hooks which is executed when dhclient-script exits or you could write code to unset the current default route if the interface is down and put it in /etc/dhclient-enter-hooks. > Incidentially, I've seen this topic come up a dozen times + never knew > what do myself until Nate Lawson pointed me in the right direction a year > ago. At that time, he remarked that this stuff isn't documented any where > + it really should be in the handbook. >=20 > Can someone point me to where I should look for information on how to > contribute to the handbook in a format that is likely to be accepted? > > This is such a standard thing to want, it has to be done! You're probably looking for the doc project primer. http://www.freebsd.org/doc/en_US.ISO8859-1/books/fdp-primer/index.html We're hoping to make route handling a bit more flexable in dhclient, but I haven't had time to work on it yet. -- Brooks > -Jon >=20 > On Thu, 1 Sep 2005, Kevin Oberman wrote: >=20 > > > Date: Thu, 1 Sep 2005 13:01:38 -0700 (PDT) > > > From: Jon Dama > > > Sender: owner-freebsd-current@freebsd.org > > > > > > Flush the routing table or at least delete the default entry in a > > > start_if.ath0 script. > > > > This is obvious, but does not answer the question: "Can't that be done > > automatically on plugging in either?" > > > > As I recall, when the OpenSSH dhclient was added, one of the things it > > was supposed to do was flush the routing table. This never seems to have > > happened and I'm not sure I'd want it to. > > > > Maybe devd could automate it? (I think I'm going to try that.) > > -- > > R. Kevin Oberman, Network Engineer > > Energy Sciences Network (ESnet) > > Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) > > E-mail: oberman@es.net Phone: +1 510 486-8634 > > > > > > > On Thu, 1 Sep 2005, Jochen Gensch wrote: > > > > > > > Hi! > > > > > > > > If I plug in my wireless nic (atheros) it comes up automatically th= rough > > > > wpa_supplicant. However the default route still points to my non wi= reless > > > > nic (fxp0) even if remove the network cable before plugging in the = wireless > > > > device. I have found no way around this, the only way of getting the > > > > default route changed to ath0 is setting in manually. Can't that be= done > > > > automatically on plugging in either? > > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" --=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 --65ImJOski3p8EhYV Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFDF4FXXY6L6fI4GtQRAkz2AJ0Yvw37RkqjSUSvx4plODxMoDdjHgCdGXqy 9lLX7MizZ04CvAYIAmg2OQY= =upY/ -----END PGP SIGNATURE----- --65ImJOski3p8EhYV--