WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] libxl: fix guest networking on NetBSD

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxl: fix guest networking on NetBSD
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Mon, 17 Jan 2011 17:05:12 -0800
Delivery-date: Mon, 17 Jan 2011 17:06:29 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Christoph Egger <Christoph.Egger@xxxxxxx>
# Date 1295284718 0
# Node ID b7b29f51205fa910a71ee992ab6b17c152d0f67c
# Parent  0dbad563a6592addd1d757afa41b3960d0862270
libxl: fix guest networking on NetBSD

As previously reported when I start guests with xl then the
guest network does not work because the qemu-ifup script
no longer runs.

NetBSD doesn't have something like udev. Changing xm/xend,
libxl and xenbackendd to make everything behave the same way
is a lot more intrusive than enabling it for NetBSD again.

Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/libxl/libxl_dm.c |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diff -r 0dbad563a659 -r b7b29f51205f tools/libxl/libxl_dm.c
--- a/tools/libxl/libxl_dm.c    Mon Jan 17 17:14:20 2011 +0000
+++ b/tools/libxl/libxl_dm.c    Mon Jan 17 17:18:38 2011 +0000
@@ -27,6 +27,15 @@
 #include "libxl_internal.h"
 #include "libxl.h"
 #include "flexarray.h"
+
+static const char *libxl_tapif_script(libxl__gc *gc)
+{
+#ifdef __linux__
+    return libxl__strdup(gc, "no");
+#else
+    return libxl__sprintf(gc, "%s/qemu-ifup", libxl_xen_script_dir_path());
+#endif
+}
 
 static char ** libxl_build_device_model_args_old(libxl__gc *gc,
                                              libxl_device_model_info *info,
@@ -129,8 +138,9 @@ static char ** libxl_build_device_model_
                 flexarray_vappend(dm_args,
                                 "-net", libxl__sprintf(gc, 
"nic,vlan=%d,macaddr=%s,model=%s",
                                                        vifs[i].devid, smac, 
vifs[i].model),
-                                "-net", libxl__sprintf(gc, 
"tap,vlan=%d,ifname=%s,bridge=%s,script=no",
-                                                       vifs[i].devid, ifname, 
vifs[i].bridge), NULL);
+                                "-net", libxl__sprintf(gc, 
"tap,vlan=%d,ifname=%s,bridge=%s,script=%s",
+                                                       vifs[i].devid, ifname, 
vifs[i].bridge, libxl_tapif_script(gc)),
+                                NULL);
                 ioemu_vifs++;
             }
         }
@@ -261,8 +271,8 @@ static char ** libxl_build_device_model_
                 flexarray_append(dm_args, libxl__sprintf(gc, 
"nic,vlan=%d,macaddr=%s,model=%s",
                             vifs[i].devid, smac, vifs[i].model));
                 flexarray_append(dm_args, "-net");
-                flexarray_append(dm_args, libxl__sprintf(gc, 
"tap,vlan=%d,ifname=%s,script=no",
-                            vifs[i].devid, ifname));
+                flexarray_append(dm_args, libxl__sprintf(gc, 
"tap,vlan=%d,ifname=%s,script=%s",
+                            vifs[i].devid, ifname, libxl_tapif_script(gc)));
                 ioemu_vifs++;
             }
         }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxl: fix guest networking on NetBSD, Xen patchbot-unstable <=