Date: Mon, 12 Mar 2007 23:49:27 +0300 From: Yar Tikhiy <yar@comp.chem.msu.su> To: Andrew Thompson <thompsa@freebsd.org> Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sbin/ifconfig ifconfig.c Message-ID: <20070312204926.GH44732@comp.chem.msu.su> In-Reply-To: <20070312182049.GB80764@heff.fud.org.nz> References: <200703121308.l2CD8urI098047@repoman.freebsd.org> <20070312182049.GB80764@heff.fud.org.nz>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070312204926.GH44732>