提交 6dd9297c 编写于 作者: J John Ferlan

conf: Adjust duplicate source host port check

Only perform the port number check if the incoming definition actually
provides it. Since the port number is optional we could erroneously pass
a duplicate source host check since some storage pool backends which fill
in the default port number (e.g., iSCSI and sheepdog) for the started pool.
上级 5f6fe84d
......@@ -2412,7 +2412,8 @@ virStoragePoolSourceMatchSingleHost(virStoragePoolSourcePtr poolsrc,
if (poolsrc->nhost != 1 && defsrc->nhost != 1)
return false;
if (poolsrc->hosts[0].port != defsrc->hosts[0].port)
if (defsrc->hosts[0].port &&
poolsrc->hosts[0].port != defsrc->hosts[0].port)
return false;
return STREQ(poolsrc->hosts[0].name, defsrc->hosts[0].name);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册