From d564e0a81c4ab83d5ddc07bdd7eb93d40f4e4670 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Sat, 20 Oct 2012 22:28:34 -0400 Subject: [PATCH] qemu: Fix domxml-to-native network model conversion https://bugzilla.redhat.com/show_bug.cgi?id=636832 (cherry picked from commit 9a2975786b74aa0fe75e3eadb39aa0f9b37e57bb) --- src/qemu/qemu_driver.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 014c99fe89..0258dbbfb9 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -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,