mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 11:31:16 +00:00
conf: Check for user aliases duplicates only
https://bugzilla.redhat.com/show_bug.cgi?id=1553162 When validating a device XML config we check if user provided alias is unique. We do this by maintaining a hash table of device aliases as we iterated over all devices defined for the domain. However, it may happen that what appears as two devices in domain XML is in fact just one interface in hypervisor. We can assume libvirt generated aliases to be unique and thus really check user provided ones only. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
e5673ed444
commit
e43263601f
@ -5573,7 +5573,7 @@ virDomainDeviceDefValidateAliasesIterator(virDomainDefPtr def,
|
||||
struct virDomainDefValidateAliasesData *data = opaque;
|
||||
const char *alias = info->alias;
|
||||
|
||||
if (!alias)
|
||||
if (!alias || !virDomainDeviceAliasIsUserAlias(alias))
|
||||
return 0;
|
||||
|
||||
/* Some crazy backcompat for consoles. */
|
||||
|
Loading…
Reference in New Issue
Block a user