mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00:00
networkValidate: Forbid new-line char in network name
New line character in name of network is now forbidden because it mess virsh output and can be confusing for users. Validation of name is done in network driver, after parsing XML to avoid problems with disappeared network which was already created with new-line char in name. Closes-Bug: https://bugzilla.redhat.com/show_bug.cgi?id=818064 Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
e1b8196866
commit
dc40dd6058
@ -2973,6 +2973,9 @@ networkValidate(virNetworkDriverStatePtr driver,
|
||||
bool bandwidthAllowed = true;
|
||||
bool usesInterface = false, usesAddress = false;
|
||||
|
||||
if (virXMLCheckIllegalChars("name", def->name, "\n") < 0)
|
||||
return -1;
|
||||
|
||||
/* Only the three L3 network types that are configured by libvirt
|
||||
* need to have a bridge device name / mac address provided
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user