From owner-cvs-all@FreeBSD.ORG Mon Mar 12 20:49:30 2007 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F099916A400; Mon, 12 Mar 2007 20:49:30 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.freebsd.org (Postfix) with ESMTP id 5B9D913C457; Mon, 12 Mar 2007 20:49:29 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.4/8.13.4) with ESMTP id l2CKnRgJ072434; Mon, 12 Mar 2007 23:49:27 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.4/8.13.4/Submit) id l2CKnRLf072433; Mon, 12 Mar 2007 23:49:27 +0300 (MSK) (envelope-from yar) Date: Mon, 12 Mar 2007 23:49:27 +0300 From: Yar Tikhiy To: Andrew Thompson Message-ID: <20070312204926.GH44732@comp.chem.msu.su> References: <200703121308.l2CD8urI098047@repoman.freebsd.org> <20070312182049.GB80764@heff.fud.org.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070312182049.GB80764@heff.fud.org.nz> User-Agent: Mutt/1.5.9i Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sbin/ifconfig ifconfig.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2007 20:49:31 -0000 On Tue, Mar 13, 2007 at 07:20:49AM +1300, Andrew Thompson wrote: > On Mon, Mar 12, 2007 at 01:08:56PM +0000, Yar Tikhiy wrote: > > yar 2007-03-12 13:08:56 UTC > > > > FreeBSD src repository > > > > Modified files: > > sbin/ifconfig ifconfig.c > > Log: > > Attempt to load the kernel module only if we are going to create a > > new interface. In other cases loading the module is unwanted and > > can lead to ill side effects. One such effect found is as follows: > > "kldunload if_foo" tells the module to kill all its interfaces, > > which results in messages sent to devd; the module unloads. Then > > devd starts processing the messages, which ends up in a etc script > > running ifconfig fooX, which reloads the module. > > Great catch! I had been wondering why it had been necessary to unload > networking modules twice lately. Yeah, just noticed the weird thing today. Now I'm in doubt whether it is OK to MFC this change. It has a little side effect, too. Namely it burns the bridge to old-style networking modules that create some interfaces as soon as loaded. Among stock interfaces, those are lo, enc, and pflog. Fortunately, neither lo nor enc is built as a separate module; and ifconfig can't load pflog anyway because the module name isn't if_pflog.ko -- for now /etc/rc.d/pflog takes care of loading pflog.ko. So the only concern left is that somebody somewhere uses such an old-style 3rd-party module and relies on the command ifconfig foo0 inet blah-blah-blah up loading the module and thus making foo0 appear instantly, without an explicit `create' parameter to ifconfig. -- Yar