[PATCH v2 3/8] storage: Add check for different ports for host duplicate matching

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In virStoragePoolSourceMatchSingleHost, add a comparison for port number
being different prior to checking the 'name' field.

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 src/conf/storage_conf.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
index f609f85..313098b 100644
--- a/src/conf/storage_conf.c
+++ b/src/conf/storage_conf.c
@@ -2412,6 +2412,9 @@ virStoragePoolSourceMatchSingleHost(virStoragePoolSourcePtr poolsrc,
     if (poolsrc->nhost != 1 && defsrc->nhost != 1)
         return false;
 
+    if (poolsrc->hosts[0].port != defsrc->hosts[0].port)
+        return false;
+
     return STREQ(poolsrc->hosts[0].name, defsrc->hosts[0].name);
 }
 
-- 
2.1.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]