Index: ioemu/vl.c
===================================================================
--- ioemu.orig/vl.c	2006-08-06 02:22:01.556312045 +0100
+++ ioemu/vl.c	2006-08-06 02:22:53.925474246 +0100
@@ -89,6 +89,7 @@
 #include "exec-all.h"
 
 #define DEFAULT_NETWORK_SCRIPT "/etc/xen/qemu-ifup"
+#define DEFAULT_BRIDGE "xenbr0"
 
 //#define DEBUG_UNUSED_IOPORT
 //#define DEBUG_IOPORT
@@ -3090,11 +3091,11 @@
 #endif
 
 static int net_tap_init(VLANState *vlan, const char *ifname1,
-                        const char *setup_script)
+                        const char *setup_script, const char *bridge)
 {
     TAPState *s;
     int pid, status, fd;
-    char *args[3];
+    char *args[4];
     char **parg;
     char ifname[128];
 
@@ -3116,6 +3117,7 @@
                 parg = args;
                 *parg++ = (char *)setup_script;
                 *parg++ = ifname;
+                *parg++ = (char *)bridge;
                 *parg++ = NULL;
                 execv(setup_script, args);
                 _exit(1);
@@ -3671,6 +3673,7 @@
     if (!strcmp(device, "tap")) {
         char ifname[64];
         char setup_script[1024];
+        char bridge[16];
         int fd;
         if (get_param_value(buf, sizeof(buf), "fd", p) > 0) {
             fd = strtol(buf, NULL, 0);
@@ -3683,7 +3686,10 @@
             if (get_param_value(setup_script, sizeof(setup_script), "script", p) == 0) {
                 pstrcpy(setup_script, sizeof(setup_script), DEFAULT_NETWORK_SCRIPT);
             }
-            ret = net_tap_init(vlan, ifname, setup_script);
+            if (get_param_value(bridge, sizeof(bridge), "bridge", p) == 0) {
+                pstrcpy(bridge, sizeof(bridge), DEFAULT_BRIDGE);
+            }
+            ret = net_tap_init(vlan, ifname, setup_script, bridge);
         }
     } else
 #endif
@@ -5208,7 +5214,7 @@
            "-net tap[,vlan=n],ifname=name\n"
            "                connect the host TAP network interface to VLAN 'n'\n"
 #else
-           "-net tap[,vlan=n][,fd=h][,ifname=name][,script=file]\n"
+           "-net tap[,vlan=n][,fd=h][,ifname=name][,script=file][,bridge=br]\n"
            "                connect the host TAP network interface to VLAN 'n' and use\n"
            "                the network script 'file' (default=%s);\n"
            "                use 'fd=h' to connect to an already opened TAP interface\n"
