mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-08 16:58:29 +03:00
qemu: match alias when looking for proper <interface> to detach.
Previously we only checked MAC address and PCI address (or CCW address). This is not enough information in cases where PCI address isn't provided and multiple interfaces have the same MAC address (for example, a virtio + hostdev "teaming" pair - their MAC addresses are always the same). Resolves: https://bugzilla.redhat.com/1926190 Signed-off-by: Laine Stump <laine@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
afb823fc50
commit
114e3b4232
@ -16431,6 +16431,11 @@ virDomainNetFindIdx(virDomainDefPtr def, virDomainNetDefPtr net)
|
||||
&net->info.addr.ccw))
|
||||
continue;
|
||||
|
||||
if (net->info.alias &&
|
||||
STRNEQ_NULLABLE(def->nets[i]->info.alias, net->info.alias)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (matchidx >= 0) {
|
||||
/* there were multiple matches on mac address, and no
|
||||
* qualifying guest-side PCI/CCW address was given, so we must
|
||||
|
Loading…
x
Reference in New Issue
Block a user