]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
uml: correct command line networking parameters
authorHeath Petersen <HeathPetersen@Kandre.com>
Thu, 2 Jun 2011 16:23:43 +0000 (11:23 -0500)
committerEric Blake <eblake@redhat.com>
Thu, 2 Jun 2011 19:52:26 +0000 (13:52 -0600)
I have been finding that some UML command line networking parameters are
being generated incorrectly.

For more information, see
https://bugzilla.redhat.com/show_bug.cgi?id=706295 .

AUTHORS
src/uml/uml_conf.c

diff --git a/AUTHORS b/AUTHORS
index 6e0276e34c964d3bc1b5650cdedb19915acaca9c..0cc09ce68e5c7c8e2afd1ab28ee2aa265918da2c 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -172,6 +172,7 @@ Patches have also been contributed by:
   Supriya Kannery      <supriyak@in.ibm.com>
   Dirk Herrendoerfer   <d.herrendoerfer@herrendoerfer.name>
   Taisuke Yamada       <tai@rakugaki.org>
+  Heath Petersen       <HeathPetersen@Kandre.com>
 
   [....send patches to get your name here....]
 
index 4f1cb243d680a8c5d5465db33c8482b29c053df7..0122472c71e51735612087575e53d415f44584ae 100644 (file)
@@ -207,7 +207,10 @@ umlBuildCommandLineNet(virConnectPtr conn,
 
     case VIR_DOMAIN_NET_TYPE_ETHERNET:
         /* ethNNN=tuntap,tapname,macaddr,gateway */
-        virBufferAddLit(&buf, "tuntap");
+        virBufferAddLit(&buf, "tuntap,");
+        if (def->ifname) {
+            virBufferAdd(&buf, def->ifname, -1);
+        }
         if (def->data.ethernet.ipaddr) {
             umlReportError(VIR_ERR_INTERNAL_ERROR, "%s",
                            _("IP address not supported for ethernet inteface"));