From owner-freebsd-current@FreeBSD.ORG Tue May 22 14:26:33 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E790716A480 for ; Tue, 22 May 2007 14:26:33 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (grnl-static-02-0046.dsl.iowatelecom.net [69.66.56.110]) by mx1.freebsd.org (Postfix) with ESMTP id 95DAC13C45D for ; Tue, 22 May 2007 14:26:33 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.13.8/8.13.8) with ESMTP id l4MEQWvv075720; Tue, 22 May 2007 09:26:32 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.13.8/8.13.8/Submit) id l4MEQWss075719; Tue, 22 May 2007 09:26:32 -0500 (CDT) (envelope-from brooks) Date: Tue, 22 May 2007 09:26:32 -0500 From: Brooks Davis To: Andrew Thompson Message-ID: <20070522142631.GA75668@lor.one-eyed-alien.net> References: <4645E8A2.1040408@FreeBSD.org> <20070512202004.GA71624@heff.fud.org.nz> <46462CB2.9050008@FreeBSD.org> <20070521212309.GA4320@heff.fud.org.nz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PNTmBPCT7hxwcZjr" Content-Disposition: inline In-Reply-To: <20070521212309.GA4320@heff.fud.org.nz> User-Agent: Mutt/1.5.15 (2007-04-06) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (lor.one-eyed-alien.net [127.0.0.1]); Tue, 22 May 2007 09:26:32 -0500 (CDT) Cc: yar@freebsd.org, freebsd-current@freebsd.org, Fredrik Lindberg Subject: Re: Network interface modules keeps re-loading 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: Tue, 22 May 2007 14:26:34 -0000 --PNTmBPCT7hxwcZjr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 22, 2007 at 09:23:09AM +1200, Andrew Thompson wrote: > On Sat, May 12, 2007 at 11:08:02PM +0200, Fredrik Lindberg wrote: > > Andrew Thompson wrote: > > > > > >A similar solution to this was committed in rev1.129 of ifconfig.c but > > >then backed out later as the module loading proved to be feature used = by > > >quite a few people. I think an example was being able to load and > > >initialise an interface by just trying 'ifconfig foo0'. > > > > > >I think a different way to solve this is to add a argument to ifconfig > > >to suppress the module loading and then use it at the appropriate plac= es > > >in rc. > > > > >=20 > > Oh, I should have read the commit logs first, sorry about that. > > Either way, I think something should be done about it. It certainly > > annoyed me today before I could figure out what as going on. > > When somebody issues a kldunload, they shouldn't get the module > > re-loaded right away. > >=20 > > Clearly people want the current behavior (although I question it > > myself), what would be an appropriate way to suppress loading? > > ifconfig -n foo0, as in no-probe/load? >=20 > Here is a patch to do this, i'll commit it unless there are any > objections. The concept seems fine. One small phrasing nit below. > Index: ifconfig.8 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /home/ncvs/src/sbin/ifconfig/ifconfig.8,v > retrieving revision 1.137 > diff -u -p -r1.137 ifconfig.8 > --- ifconfig.8 17 Apr 2007 00:35:09 -0000 1.137 > +++ ifconfig.8 21 May 2007 21:15:18 -0000 > @@ -1579,6 +1579,11 @@ For example, the values of 802.11 WEP ke > the current user. > This information is not printed by default, as it may be considered > sensitive. > +.Pp=20 > +If the network interface driver is not present in the kernel then the mo= dule > +will be loaded, the > +.Fl n > +flag suppresses this. I'd say something like: +If the network interface driver is not present in the kernel then =2ENm will attempt to load it. The =2EFl n flag disables this behavior. The key is that ifconfig is pretty stupid about loading things and can't figure out what to load in some circumstances. -- Brooks --PNTmBPCT7hxwcZjr Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFGUv2XXY6L6fI4GtQRAl4BAJ47F//bY2O3IGRSTLS5ZD3FL/KhxwCfSpEn AIHNZQxiUpE2JJj3jLtTz5M= =uTX2 -----END PGP SIGNATURE----- --PNTmBPCT7hxwcZjr--