From owner-svn-src-all@FreeBSD.ORG Mon May 17 20:06:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52C311065678; Mon, 17 May 2010 20:06:20 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 251E58FC35; Mon, 17 May 2010 20:06:20 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id C611E46B7E; Mon, 17 May 2010 16:06:17 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id E47428A025; Mon, 17 May 2010 16:06:16 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Date: Mon, 17 May 2010 16:05:40 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201005171951.o4HJpYc6021866@svn.freebsd.org> In-Reply-To: <201005171951.o4HJpYc6021866@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201005171605.41009.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 17 May 2010 16:06:17 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r208213 - head/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 20:06:20 -0000 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 ' 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 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