summaryrefslogtreecommitdiff
path: root/interface-definitions
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-04-03 14:23:00 +0200
committerChristian Poessinger <christian@poessinger.com>2020-04-03 14:23:02 +0200
commita509d5ee53f42912d9722c9aae890e2ca6967680 (patch)
tree16c58303abb056ecb5778292844bc4292cad471f /interface-definitions
parent551e41895953bb291fc10bdb9ba2a07e83310070 (diff)
downloadvyos-1x-a509d5ee53f42912d9722c9aae890e2ca6967680.tar.gz
vyos-1x-a509d5ee53f42912d9722c9aae890e2ca6967680.zip
vrf: T31: name of isntance is not allowed to mimic an interface name
Every VRF that's created is not allowed to be named like any interface that can be active on the system. This includes eth, lan, br, dum, lo .... In theoriy this would work but as soon as such a regular interface is created things will go sideways rather quick thus we limit the namespace which can be used to create a VRF. Appending an interface name is still possible like coolvrf-eth0.
Diffstat (limited to 'interface-definitions')
-rw-r--r--interface-definitions/vrf.xml.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/interface-definitions/vrf.xml.in b/interface-definitions/vrf.xml.in
index 76748e5ae..7c75bf824 100644
--- a/interface-definitions/vrf.xml.in
+++ b/interface-definitions/vrf.xml.in
@@ -17,9 +17,9 @@
<properties>
<help>VRF instance name</help>
<constraint>
- <regex>[^/\s]{1,16}$</regex>
+ <validator name="vrf-name"/>
</constraint>
- <constraintErrorMessage>VRF instance name must be 16 characters or less</constraintErrorMessage>
+ <constraintErrorMessage>VRF instance name must be 16 characters or less and can not\nbe named as regular network interfaces</constraintErrorMessage>
<valueHelp>
<format>name</format>
<description>Instance name</description>
@@ -44,4 +44,4 @@
</tagNode>
</children>
</node>
-</interfaceDefinition> \ No newline at end of file
+</interfaceDefinition>