]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Fix domxml-to-native network model conversion
authorCole Robinson <crobinso@redhat.com>
Sun, 21 Oct 2012 02:28:34 +0000 (22:28 -0400)
committerCole Robinson <crobinso@redhat.com>
Sat, 27 Oct 2012 16:20:49 +0000 (12:20 -0400)
https://bugzilla.redhat.com/show_bug.cgi?id=636832

src/qemu/qemu_driver.c

index 6511cc1dbb7cbc402c09c201621bae1882fa0d32..7dccf86f0ac645186cb9ee093bd1a7ca1ba47988 100644 (file)
@@ -5375,6 +5375,8 @@ static char *qemuDomainXMLToNative(virConnectPtr conn,
     for (i = 0 ; i < def->nnets ; i++) {
         virDomainNetDefPtr net = def->nets[i];
         int bootIndex = net->info.bootIndex;
+        char *model = net->model;
+
         if (net->type == VIR_DOMAIN_NET_TYPE_NETWORK) {
             int actualType = virDomainNetGetActualType(net);
             const char *brname;
@@ -5431,8 +5433,10 @@ static char *qemuDomainXMLToNative(virConnectPtr conn,
             net->data.ethernet.dev = brname;
             net->data.ethernet.ipaddr = ipaddr;
         }
+
         VIR_FREE(net->virtPortProfile);
         net->info.bootIndex = bootIndex;
+        net->model = model;
     }
 
     monitor_json = qemuCapsGet(caps, QEMU_CAPS_MONITOR_JSON);