mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-29 00:55:22 +00:00
qemu: Fix domxml-to-native network model conversion
https://bugzilla.redhat.com/show_bug.cgi?id=636832
(cherry picked from commit 9a2975786b
)
This commit is contained in:
parent
93ac917c95
commit
d564e0a81c
@ -5164,6 +5164,8 @@ static char *qemuDomainXMLToNative(virConnectPtr conn,
|
|||||||
for (i = 0 ; i < def->nnets ; i++) {
|
for (i = 0 ; i < def->nnets ; i++) {
|
||||||
virDomainNetDefPtr net = def->nets[i];
|
virDomainNetDefPtr net = def->nets[i];
|
||||||
int bootIndex = net->info.bootIndex;
|
int bootIndex = net->info.bootIndex;
|
||||||
|
char *model = net->model;
|
||||||
|
|
||||||
if (net->type == VIR_DOMAIN_NET_TYPE_NETWORK) {
|
if (net->type == VIR_DOMAIN_NET_TYPE_NETWORK) {
|
||||||
int actualType = virDomainNetGetActualType(net);
|
int actualType = virDomainNetGetActualType(net);
|
||||||
const char *brname;
|
const char *brname;
|
||||||
@ -5220,8 +5222,10 @@ static char *qemuDomainXMLToNative(virConnectPtr conn,
|
|||||||
net->data.ethernet.dev = brname;
|
net->data.ethernet.dev = brname;
|
||||||
net->data.ethernet.ipaddr = ipaddr;
|
net->data.ethernet.ipaddr = ipaddr;
|
||||||
}
|
}
|
||||||
|
|
||||||
VIR_FREE(net->virtPortProfile);
|
VIR_FREE(net->virtPortProfile);
|
||||||
net->info.bootIndex = bootIndex;
|
net->info.bootIndex = bootIndex;
|
||||||
|
net->model = model;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (qemuCapsExtractVersionInfo(def->emulator, def->os.arch,
|
if (qemuCapsExtractVersionInfo(def->emulator, def->os.arch,
|
||||||
|
Loading…
Reference in New Issue
Block a user