From: Paulo de Rezende Pinatti Date: Tue, 16 Jun 2020 14:32:10 +0000 (+0200) Subject: qemu: do not add model when actual iface type is hostdev X-Git-Tag: v6.5.0-rc1~154 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=v6.4.0-131-gbdb8f2e418;p=thirdparty%2Flibvirt.git qemu: do not add model when actual iface type is hostdev No default model should be added to the interface entry at post parse when its actual network type is hostdev as doing so might cause a mismatch between the interface definition and its actual device type. Signed-off-by: Paulo de Rezende Pinatti Reviewed-by: Laine Stump --- diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 2dad823a86..33ce0ad992 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -5831,6 +5831,7 @@ qemuDomainDeviceNetDefPostParse(virDomainNetDefPtr net, virQEMUCapsPtr qemuCaps) { if (net->type != VIR_DOMAIN_NET_TYPE_HOSTDEV && + virDomainNetResolveActualType(net) != VIR_DOMAIN_NET_TYPE_HOSTDEV && !virDomainNetGetModelString(net)) net->model = qemuDomainDefaultNetModel(def, qemuCaps);