提交 e1b81968 编写于 作者: S Sławek Kapłoński 提交者: Michal Privoznik

network: Use new util function to check name

New util function virXMLCheckIllegalChars is now used to test if
parsed network contains illegal char '/' in it's name.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 7a221646
......@@ -2117,11 +2117,8 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt)
goto error;
}
if (strchr(def->name, '/')) {
virReportError(VIR_ERR_XML_ERROR,
_("name %s cannot contain '/'"), def->name);
if (virXMLCheckIllegalChars("name", def->name, "/") < 0)
goto error;
}
/* Extract network uuid */
tmp = virXPathString("string(./uuid[1])", ctxt);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册