summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsarthurdev <965089+sarthurdev@users.noreply.github.com>2022-11-22 12:23:24 +0100
committersarthurdev <965089+sarthurdev@users.noreply.github.com>2022-11-22 12:55:46 +0100
commit8b7a1399fb2b4327798ec748f96a457420a912c3 (patch)
tree906654025e296feaf1afe6dbbf22d7e51eca8200
parent05b60b2dc6bd2187501b2583cdaa27a90c45b1d5 (diff)
downloadvyos-1x-8b7a1399fb2b4327798ec748f96a457420a912c3.tar.gz
vyos-1x-8b7a1399fb2b4327798ec748f96a457420a912c3.zip
container: T4834: Limit network names to 11 characters (15 char max including "cni-" prefix)
* Error: unable to start container "<id>": plugin type="bridge" failed (add): cni plugin bridge failed: failed to create bridge "cni-thisismorethan15chars": could not add "cni-thisismorethan15chars": numerical result out of range
-rw-r--r--interface-definitions/container.xml.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/interface-definitions/container.xml.in b/interface-definitions/container.xml.in
index f84c94a40..d50039665 100644
--- a/interface-definitions/container.xml.in
+++ b/interface-definitions/container.xml.in
@@ -272,6 +272,10 @@
<tagNode name="network">
<properties>
<help>Network name</help>
+ <constraint>
+ <regex>[-_a-zA-Z0-9]{1,11}</regex>
+ </constraint>
+ <constraintErrorMessage>Network name cannot be longer than 11 characters</constraintErrorMessage>
</properties>
<children>
<leafNode name="description">