2008-07-19 01:04:37 +02:00
|
|
|
Index: xen-3.3.0-testing/tools/examples/xend-config.sxp
|
2007-01-16 00:42:10 +01:00
|
|
|
===================================================================
|
2008-07-19 01:04:37 +02:00
|
|
|
--- xen-3.3.0-testing.orig/tools/examples/xend-config.sxp
|
|
|
|
+++ xen-3.3.0-testing/tools/examples/xend-config.sxp
|
2008-08-18 00:24:29 +02:00
|
|
|
@@ -141,7 +141,8 @@
|
2007-01-16 00:42:10 +01:00
|
|
|
#
|
|
|
|
# (network-script 'network-bridge netdev=eth1')
|
|
|
|
#
|
|
|
|
-# The bridge is named xenbr0, by default. To rename the bridge, use
|
|
|
|
+# The bridge is named to match the outgoing interface, by default. For example,
|
|
|
|
+# eth1 is on xenbr1. To rename the bridge, use
|
|
|
|
#
|
|
|
|
# (network-script 'network-bridge bridge=<name>')
|
|
|
|
#
|
2008-08-18 00:24:29 +02:00
|
|
|
Index: xen-3.3.0-testing/tools/ioemu-remote/vl.c
|
2007-01-16 00:42:10 +01:00
|
|
|
===================================================================
|
2008-08-18 00:24:29 +02:00
|
|
|
--- xen-3.3.0-testing.orig/tools/ioemu-remote/vl.c
|
|
|
|
+++ xen-3.3.0-testing/tools/ioemu-remote/vl.c
|
|
|
|
@@ -134,8 +134,8 @@ int inet_aton(const char *cp, struct in_
|
|
|
|
#include "exec-all.h"
|
|
|
|
|
|
|
|
#ifndef DEFAULT_NETWORK_SCRIPT
|
|
|
|
-#define DEFAULT_NETWORK_SCRIPT "/etc/qemu-ifup"
|
|
|
|
-#define DEFAULT_NETWORK_DOWN_SCRIPT "/etc/qemu-ifdown"
|
|
|
|
+#define DEFAULT_NETWORK_SCRIPT "/etc/xen/qemu-ifup"
|
|
|
|
+#define DEFAULT_NETWORK_DOWN_SCRIPT "/etc/xen/qemu-ifdown"
|
2007-12-20 16:46:41 +01:00
|
|
|
#endif
|
|
|
|
#ifdef __sun__
|
|
|
|
#define SMBD_COMMAND "/usr/sfw/sbin/smbd"
|
2008-08-18 00:24:29 +02:00
|
|
|
@@ -4997,10 +4997,10 @@ static int net_client_init(const char *s
|
|
|
|
pstrcpy(down_script, sizeof(down_script), DEFAULT_NETWORK_DOWN_SCRIPT);
|
2007-01-16 00:42:10 +01:00
|
|
|
}
|
2008-08-18 00:24:29 +02:00
|
|
|
if (get_param_value(script_arg, sizeof(script_arg), "scriptarg", p) == 0 &&
|
|
|
|
- get_param_value(script_arg, sizeof(script_arg), "bridge", p) == 0) { /* deprecated; for xend compatibility */
|
|
|
|
- pstrcpy(script_arg, sizeof(script_arg), "");
|
2007-01-16 00:42:10 +01:00
|
|
|
- }
|
2008-08-18 00:24:29 +02:00
|
|
|
- ret = net_tap_init(vlan, ifname, setup_script, down_script, script_arg);
|
|
|
|
+ get_param_value(script_arg, sizeof(script_arg), "bridge", p) == 0) /* deprecated; for xend compatibility */
|
|
|
|
+ ret = net_tap_init(vlan, ifname, setup_script, NULL, NULL);
|
2007-01-16 00:42:10 +01:00
|
|
|
+ else
|
2008-08-18 00:24:29 +02:00
|
|
|
+ ret = net_tap_init(vlan, ifname, setup_script, down_script, script_arg);
|
2007-01-16 00:42:10 +01:00
|
|
|
}
|
|
|
|
} else
|
|
|
|
#endif
|
2008-07-19 01:04:37 +02:00
|
|
|
Index: xen-3.3.0-testing/tools/python/xen/xend/image.py
|
2007-01-16 00:42:10 +01:00
|
|
|
===================================================================
|
2008-07-19 01:04:37 +02:00
|
|
|
--- xen-3.3.0-testing.orig/tools/python/xen/xend/image.py
|
|
|
|
+++ xen-3.3.0-testing/tools/python/xen/xend/image.py
|
2008-08-18 00:24:29 +02:00
|
|
|
@@ -764,14 +764,16 @@ class HVMImageHandler(ImageHandler):
|
2007-02-11 11:48:10 +01:00
|
|
|
mac = devinfo.get('mac')
|
|
|
|
if mac is None:
|
2007-12-20 16:46:41 +01:00
|
|
|
raise VmError("MAC address not specified or generated.")
|
2007-02-11 11:48:10 +01:00
|
|
|
- bridge = devinfo.get('bridge', 'xenbr0')
|
|
|
|
+ bridge = devinfo.get('bridge', None)
|
|
|
|
model = devinfo.get('model', 'rtl8139')
|
|
|
|
ret.append("-net")
|
|
|
|
ret.append("nic,vlan=%d,macaddr=%s,model=%s" %
|
|
|
|
(nics, mac, model))
|
|
|
|
ret.append("-net")
|
2008-07-19 01:04:37 +02:00
|
|
|
- ret.append("tap,vlan=%d,ifname=tap%d.%d,bridge=%s" %
|
|
|
|
- (nics, self.vm.getDomid(), nics-1, bridge))
|
|
|
|
+ net = "tap,vlan=%d,ifname=tap%d.%d" % (nics, self.vm.getDomid(), nics-1)
|
2007-02-11 11:48:10 +01:00
|
|
|
+ if bridge:
|
2008-07-19 01:04:37 +02:00
|
|
|
+ net += ",bridge=%s" % bridge
|
2007-02-11 11:48:10 +01:00
|
|
|
+ ret.append(net)
|
2007-01-16 00:42:10 +01:00
|
|
|
|
2008-08-18 00:24:29 +02:00
|
|
|
if nics == 0:
|
|
|
|
ret.append("-net")
|
|
|
|
Index: xen-3.3.0-testing/tools/ioemu-remote/i386-dm/qemu-ifup
|
2007-01-16 00:42:10 +01:00
|
|
|
===================================================================
|
2008-08-18 00:24:29 +02:00
|
|
|
--- xen-3.3.0-testing.orig/tools/ioemu-remote/i386-dm/qemu-ifup
|
|
|
|
+++ xen-3.3.0-testing/tools/ioemu-remote/i386-dm/qemu-ifup
|
2007-12-20 16:46:41 +01:00
|
|
|
@@ -1,11 +1,11 @@
|
2007-01-16 00:42:10 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
-#. /etc/rc.d/init.d/functions
|
|
|
|
-#ulimit -c unlimited
|
|
|
|
-
|
2007-04-26 01:53:07 +02:00
|
|
|
-echo 'config qemu network with xen bridge for ' $*
|
2007-12-20 16:46:41 +01:00
|
|
|
-
|
|
|
|
bridge=$2
|
2007-01-16 00:42:10 +01:00
|
|
|
+if [ -z "$bridge" ]; then
|
|
|
|
+ brnum=$(ip route list | awk '/^default / { print $NF }' | sed 's/^[^0-9]*//')
|
|
|
|
+ brnum=${brnum:-0}
|
|
|
|
+ bridge=xenbr${brnum}
|
|
|
|
+fi
|
|
|
|
|
2007-12-20 16:46:41 +01:00
|
|
|
#
|
|
|
|
# Old style bridge setup with netloop, used to have a bridge name
|