New util function virXMLNodeHasIllegalChars is now used to test if parsed network contains illegal char '/' in it's name. --- src/conf/network_conf.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index aa39776..bd934f1 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@ -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 (virXMLNodeHasIllegalChars("name", def->name, "/")) goto error; - } /* Extract network uuid */ tmp = virXPathString("string(./uuid[1])", ctxt); -- 2.10.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list