svn commit: r208385 - stable/7/etc

John Baldwin jhb at
Fri May 21 16:17:46 UTC 2010

Author: jhb
Date: Fri May 21 16:17:46 2010
New Revision: 208385

  MFC 208213:
  Prevent unloading a kld for a driver that has subinterfaces (vlan 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.

Directory Properties:
  stable/7/etc/   (props changed)

Modified: stable/7/etc/network.subr
--- stable/7/etc/network.subr	Fri May 21 16:17:08 2010	(r208384)
+++ stable/7/etc/network.subr	Fri May 21 16:17:46 2010	(r208385)
@@ -485,7 +485,7 @@ clone_down()
 	for ifn in ${cloned_interfaces}; do
-		ifconfig ${ifn} destroy
+		ifconfig -n ${ifn} destroy
 		if [ $? -eq 0 ]; then
 			[ -z "$_prefix" ] && _prefix=' '
@@ -549,10 +549,7 @@ childif_destroy()
 		if ! ifexists $child; then
-		if autoif $child; then
-			ifn_stop $child
-		fi
-		ifconfig $child destroy && cfg=0
+		ifconfig -n $child destroy && cfg=0
 	return ${cfg}

More information about the svn-src-stable-7 mailing list