New line character in name of network is now forbidden because it
mess virsh output and can be confusing for users.

Closes-Bug: https://bugzilla.redhat.com/show_bug.cgi?id=818064
---
 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..a7f802b 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 (virXMLCheckString("name", def->name, "/\n"))
         goto error;
-    }
 
     /* Extract network uuid */
     tmp = virXPathString("string(./uuid[1])", ctxt);
-- 
2.10.0

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

Reply via email to