xen/bridge-bonding.diff
Charles Arnold 05bedd5488 - bnc#681302 - xm create -x <guest> returns "ImportError: No module
named ext"
  xm-create-xflag.patch

- Fix xen-utils to cope with xen-unstable c/s 21483

- xz-devel is available since 11.2, make it optional for SLES11SP1

- bnc#665610 - xm console > 1 to same VM messes up both consoles
  Upstream rejected due to portability concern, see
  http://lists.xensource.com/archives/html/xen-devel/2011-02/msg00942.html
  xenconsole-no-multiple-connections.patch
- Enable support for kernel decompression for gzip, bzip2, and LZMA
  so that kernels compressed with any of these methods can be
  launched.

- Update to Xen 4.1.0 c/s 22861

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=102
2011-03-21 16:47:37 +00:00

58 lines
1.7 KiB
Diff

Index: xen-4.1.0-testing/tools/hotplug/Linux/network-bridge
===================================================================
--- xen-4.1.0-testing.orig/tools/hotplug/Linux/network-bridge
+++ xen-4.1.0-testing/tools/hotplug/Linux/network-bridge
@@ -249,6 +249,9 @@ op_start () {
claim_lock "network-bridge"
+ local bonded=""
+ [ -e /sys/class/net/${netdev}/bonding ] && bonded="yes"
+
vlans=$(find_active_vlans "${netdev}")
for vlan in $vlans ; do ifdown $vlan ; done
@@ -266,18 +269,32 @@ op_start () {
ip link set ${netdev} down
ip addr flush ${netdev}
fi
- ip link set ${netdev} name ${pdev}
- ip link set ${tdev} name ${bridge}
-
- setup_physical_bridge_port ${pdev}
- # Restore slaves
- if [ -n "${slaves}" ]; then
- ip link set ${pdev} up
- ifenslave ${pdev} ${slaves}
+ if [ "x${bonded}" = "xyes" ]
+ then
+ ip link set ${tdev} name ${bridge}
+ ln -sf /etc/sysconfig/network/ifcfg-${netdev} /etc/sysconfig/network/ifcfg-${pdev}
+ ifup ${pdev}
+ local gw=`ip route show dev ${pdev} | fgrep default | sed 's/default via //'`
+ ip addr flush ${pdev}
+ rm -f /etc/sysconfig/network/ifcfg-${pdev}
+ brctl addif ${bridge} ${pdev}
+ ip link set ${bridge} up
+ [ -n "$gw" ] && ip route add default via ${gw}
+ else
+ ip link set ${netdev} name ${pdev}
+ ip link set ${tdev} name ${bridge}
+
+ setup_bridge_port ${pdev}
+
+ # Restore slaves
+ if [ -n "${slaves}" ]; then
+ ip link set ${pdev} up
+ ifenslave ${pdev} ${slaves}
+ fi
+ add_to_bridge2 ${bridge} ${pdev}
+ do_ifup ${bridge}
fi
- add_to_bridge2 ${bridge} ${pdev}
- do_ifup ${bridge}
for vlan in $vlans ; do ifup $vlan ; done