Date: Mon, 17 May 2010 16:05:40 -0400 From: John Baldwin <jhb@freebsd.org> To: src-committers@freebsd.org Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r208213 - head/etc Message-ID: <201005171605.41009.jhb@freebsd.org> In-Reply-To: <201005171951.o4HJpYc6021866@svn.freebsd.org> References: <201005171951.o4HJpYc6021866@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 17 May 2010 3:51:34 pm John Baldwin wrote: > Author: jhb > Date: Mon May 17 19:51:34 2010 > New Revision: 208213 > URL: http://svn.freebsd.org/changeset/base/208213 > > Log: > Prevent unloading a kld for a driver that has subinterfaces (vlan and/or > wlan interfaces) from being automatically reloaded via devd shutdown > event handlers. > - Revert part of my previous changes to call ifn_stop on subinterfaces > when an interface is detached. It is better to destroy the interfaces > first so that an 'ifconfig foo0.blah down' doesn't result in ifconfig > auto-loading if_foo.ko. The ifconfig command will not be invoked if > foo0.blah is gone when ifn_stop() is called. Furthermore, it is not > necessary to explicitly invoke ifn_stop() after the subinterface is > destroyed as devd will already do that. > - Pass -n to ifconfig when destroying interfaces so that destroying a > cloned interface does not kldload any drivers. Arguably, ifconfig's autoloading behavior is probably a bit broken. First, doing 'ifconfig foo0.blah <anything>' probably shouldn't try to autoload if_foo.ko. It should try to trim off a string of digits at the end and then autoload the result instead of walking to find the first digit and then loading that. Second, 'ifconfig <blah> destroy' should probably imply -n and not autoload anything. An interface wouldn't exist to be destroyed unless its driver was already loaded. Adding -n in network.subr is the most expedient fix, but I think fixing ifconfig is a better long term solution. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005171605.41009.jhb>