1. Remove workaround patch
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Thu, 25 Aug 2005 15:51:30 +0000 (15:51 +0000)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Thu, 25 Aug 2005 15:51:30 +0000 (15:51 +0000)
2. Update scripts/vif-bridge to not call 'brctl delif'

When a domU is shutdown/destroyed and the netif is destroyed, the
notify_call_chain triggered from unregister_netdevice() will trigger the
bridge event handler and which will call the proper code to remove the
device from the bridge.

I can't see any reason why brtcl delif should be called when taking out
a domain if the call chain will delete the interface from the bridge
when the vif is destroyed automatically.

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
patches/linux-2.6.12/workaround_double_br_del_if.patch [deleted file]
tools/examples/vif-bridge

diff --git a/patches/linux-2.6.12/workaround_double_br_del_if.patch b/patches/linux-2.6.12/workaround_double_br_del_if.patch
deleted file mode 100644 (file)
index 8c43e19..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- linux-2.6.12/net/bridge/br_if.c    2005-06-17 14:48:29.000000000 -0500
-+++ linux-2.6.12-xen0-smp/net/bridge/br_if.c   2005-08-18 15:17:27.302615846 -0500
-@@ -382,7 +382,7 @@
- {
-       struct net_bridge_port *p = dev->br_port;
-       
--      if (!p || p->br != br) 
-+      if (!p || p->br != br || p->state == BR_STATE_DISABLED)
-               return -EINVAL;
-       br_sysfs_removeif(p);
index 1c5bc161f90a3c1ae1393ee25762a9836416a801..f27a4b03eef9136aab6cefc2110b7ee68a78aab6 100755 (executable)
@@ -74,8 +74,10 @@ if [ "${bridge}" == "null" ] ; then
     exit
 fi
 
-# Add/remove vif to/from bridge.
-brctl ${brcmd} ${bridge} ${vif}
+# Add vif to bridge. vifs are auto-removed from bridge.
+if [ "${brcmd}" == "addif" ] ; then
+    brctl ${brcmd} ${bridge} ${vif}
+fi
 ifconfig ${vif} $OP
 
 if [ ${ip} ] ; then