]> git.ipfire.org Git - thirdparty/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 19:18:02 +0000 (15:18 -0400)
https://bugzilla.redhat.com/show_bug.cgi?id=636832
(cherry picked from commit 9a2975786b74aa0fe75e3eadb39aa0f9b37e57bb)

src/qemu/qemu_driver.c

index 014c99fe89b628adee0b4f4b6610a03f7c0f6cff..0258dbbfb960f742551052970c22f5ccc88aa82f 100644 (file)
@@ -5164,6 +5164,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;
@@ -5220,8 +5222,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;
     }
 
     if (qemuCapsExtractVersionInfo(def->emulator, def->os.arch,