mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 21:34:54 +03:00
qemu_extdevice: Make qemuExtDevicesHasDevice() check def->nets
We can have external helper processes running for domain <interface/> too (e.g. slirp or passt). But this is not reflected in qemuExtDevicesHasDevice() which simply ignores these. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Laine Stump <laine@redhat.com>
This commit is contained in:
parent
c16214087c
commit
b7b058d5f4
@ -296,6 +296,17 @@ qemuExtDevicesHasDevice(virDomainDef *def)
|
||||
return true;
|
||||
}
|
||||
|
||||
for (i = 0; i < def->nnets; i++) {
|
||||
virDomainNetDef *net = def->nets[i];
|
||||
|
||||
if (QEMU_DOMAIN_NETWORK_PRIVATE(net)->slirp)
|
||||
return true;
|
||||
|
||||
if (net->type == VIR_DOMAIN_NET_TYPE_USER &&
|
||||
net->backend.type == VIR_DOMAIN_NET_BACKEND_PASST)
|
||||
return true;
|
||||
}
|
||||
|
||||
for (i = 0; i < def->ntpms; i++) {
|
||||
if (def->tpms[i]->type == VIR_DOMAIN_TPM_TYPE_EMULATOR)
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user