xen/bridge-vlan.diff
Charles Arnold 8547e28bd5 - Upstream patches from Jan
23233-hvm-cr-access.patch
  23234-svm-decode-assist-base.patch
  23235-svm-decode-assist-crs.patch
  23236-svm-decode-assist-invlpg.patch
  23238-svm-decode-assist-insn-fetch.patch
  23303-cpufreq-misc.patch
  23304-amd-oprofile-strings.patch
  23305-amd-fam15-xenoprof.patch
  23306-amd-fam15-vpmu.patch
  23334-amd-fam12+14-vpmu.patch
  23338-vtd-force-intremap.patch

- fate#310957 - Update to Xen 4.1.1-rc1 c/s 23064 

- xentrace: dynamic tracebuffer allocation
  xen-unstable.xentrace.dynamic_tbuf.patch
  xen-unstable.xentrace.empty_t_info_pages.patch
  xen-unstable.xentrace.verbose.patch
  xen-unstable.xentrace.no_gdprintk.patch
  xen-unstable.xentrace.comments.patch
  xen-unstable.xentrace.printk_prefix.patch
  xen-unstable.xentrace.remove_debug_printk.patch
  xen-unstable.xentrace.t_info_pages-formula.patch
  xen-unstable.xentrace.register_cpu_notifier-boot_time.patch
  xen-unstable.xentrace.t_info_page-overflow.patch
  xen-unstable.xentrace.t_info_first_offset.patch
  xen-unstable.xentrace.data_size__read_mostly.patch
  xen-unstable.xentrace.__insert_record-dst-type.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=124
2011-05-31 17:35:29 +00:00

72 lines
1.9 KiB
Diff

Index: xen-4.1.1-testing/tools/hotplug/Linux/network-bridge
===================================================================
--- xen-4.1.1-testing.orig/tools/hotplug/Linux/network-bridge
+++ xen-4.1.1-testing/tools/hotplug/Linux/network-bridge
@@ -193,6 +193,28 @@ antispoofing () {
iptables -A FORWARD -m physdev --physdev-in ${pdev} -j ACCEPT
}
+find_active_vlans() {
+ local netdev=$1
+ local vlan
+ local vlans
+ vlans=""
+ for vifcfg in /etc/sysconfig/network/ifcfg-vlan* ; do
+ vlan=${vifcfg/*\/ifcfg-}
+ if [ "$vlan" = "vlan*" ]; then
+ continue
+ fi
+ . $vifcfg
+ etherdevice="$ETHERDEVICE"
+ if [ -x /sbin/getcfg-interface ]; then
+ etherdevice=$(/sbin/getcfg-interface "$ETHERDEVICE")
+ fi
+ if [ "$ETHERDEVICE" = "$netdev" ] || [ "$etherdevice" = "$netdev" ] ; then
+ link_exists "$vlan" && vlans="$vlans $vlan"
+ fi
+ done
+ echo "$vlans"
+}
+
# Usage: show_status dev bridge
# Print ifconfig and routes.
show_status () {
@@ -227,6 +249,9 @@ op_start () {
claim_lock "network-bridge"
+ vlans=$(find_active_vlans "${netdev}")
+ for vlan in $vlans ; do ifdown $vlan ; done
+
create_bridge ${tdev}
preiftransfer ${netdev}
@@ -254,6 +279,8 @@ op_start () {
add_to_bridge2 ${bridge} ${pdev}
do_ifup ${bridge}
+ for vlan in $vlans ; do ifup $vlan ; done
+
if [ ${antispoof} = 'yes' ] ; then
antispoofing
fi
@@ -275,6 +302,9 @@ op_stop () {
claim_lock "network-bridge"
+ vlans=$(find_active_vlans "${netdev}")
+ for vlan in $vlans ; do ifdown $vlan ; done
+
transfer_addrs ${bridge} ${pdev}
if ! ifdown ${bridge}; then
get_ip_info ${bridge}
@@ -291,6 +321,8 @@ op_stop () {
ip link set ${pdev} name ${netdev}
do_ifup ${netdev}
+ for vlan in $vlans ; do ifup $vlan ; done
+
release_lock "network-bridge"
}