|
|
952426 |
From 3860c41885fc2365dd10559dbc6c721265673a36 Mon Sep 17 00:00:00 2001
|
|
|
952426 |
Message-Id: <3860c41885fc2365dd10559dbc6c721265673a36@dist-git>
|
|
|
952426 |
From: Michal Privoznik <mprivozn@redhat.com>
|
|
|
952426 |
Date: Wed, 14 Mar 2018 08:18:44 +0100
|
|
|
952426 |
Subject: [PATCH] conf: Check for user aliases duplicates only
|
|
|
952426 |
|
|
|
952426 |
RHEL-7.6: https://bugzilla.redhat.com/show_bug.cgi?id=1553162
|
|
|
952426 |
RHEL-7.5.z: https://bugzilla.redhat.com/show_bug.cgi?id=1554962
|
|
|
952426 |
|
|
|
952426 |
When validating a device XML config we check if user provided
|
|
|
952426 |
alias is unique. We do this by maintaining a hash table of device
|
|
|
952426 |
aliases as we iterated over all devices defined for the domain.
|
|
|
952426 |
However, it may happen that what appears as two devices in domain
|
|
|
952426 |
XML is in fact just one interface in hypervisor. We can assume
|
|
|
952426 |
libvirt generated aliases to be unique and thus really check user
|
|
|
952426 |
provided ones only.
|
|
|
952426 |
|
|
|
952426 |
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
952426 |
(cherry picked from commit e43263601fe27feb8d005668528f35f75428b8c6)
|
|
|
952426 |
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
952426 |
---
|
|
|
952426 |
src/conf/domain_conf.c | 2 +-
|
|
|
952426 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
952426 |
|
|
|
952426 |
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
|
|
|
952426 |
index c746ab19cd..a0c0702a6c 100644
|
|
|
952426 |
--- a/src/conf/domain_conf.c
|
|
|
952426 |
+++ b/src/conf/domain_conf.c
|
|
|
952426 |
@@ -5560,7 +5560,7 @@ virDomainDeviceDefValidateAliasesIterator(virDomainDefPtr def,
|
|
|
952426 |
struct virDomainDefValidateAliasesData *data = opaque;
|
|
|
952426 |
const char *alias = info->alias;
|
|
|
952426 |
|
|
|
952426 |
- if (!alias)
|
|
|
952426 |
+ if (!alias || !virDomainDeviceAliasIsUserAlias(alias))
|
|
|
952426 |
return 0;
|
|
|
952426 |
|
|
|
952426 |
/* Some crazy backcompat for consoles. */
|
|
|
952426 |
--
|
|
|
952426 |
2.16.2
|
|
|
952426 |
|