summaryrefslogtreecommitdiff
path: root/interface-definitions/interfaces-tunnel.xml.in
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-11-20 12:55:59 +0100
committerChristian Poessinger <christian@poessinger.com>2020-11-20 12:55:59 +0100
commit7ad026794beee0bc4310a96bac286823283b7fd8 (patch)
treed08306b99dd4c361099938ef225fe366116d5113 /interface-definitions/interfaces-tunnel.xml.in
parent1b3cde673ad0e00198565711ae5d6969ebd1cd82 (diff)
parent672eaeb2be1ce3176083017283389d0c0bd5d052 (diff)
downloadvyos-1x-7ad026794beee0bc4310a96bac286823283b7fd8.tar.gz
vyos-1x-7ad026794beee0bc4310a96bac286823283b7fd8.zip
Merge branch 'tunnel-rewrite' into current
* tunnel-rewrite: tunnel: T3068: automatic generate link-local adresses tunnel: T3072: interfaces used for NHRP can not be deleted tunnel: T3072: xml: harden regex validators tunnel: T3072: migrate to get_config_dict()
Diffstat (limited to 'interface-definitions/interfaces-tunnel.xml.in')
-rw-r--r--interface-definitions/interfaces-tunnel.xml.in41
1 files changed, 25 insertions, 16 deletions
diff --git a/interface-definitions/interfaces-tunnel.xml.in b/interface-definitions/interfaces-tunnel.xml.in
index c3f178d59..b322374b3 100644
--- a/interface-definitions/interfaces-tunnel.xml.in
+++ b/interface-definitions/interfaces-tunnel.xml.in
@@ -39,7 +39,6 @@
<script>${vyos_completion_dir}/list_local.py</script>
</completionHelp>
<constraint>
- <!-- does it need fixing/changing to be more restrictive ? -->
<validator name="ip-address"/>
</constraint>
</properties>
@@ -104,7 +103,7 @@
<script>${vyos_completion_dir}/list_interfaces.py</script>
</completionHelp>
<constraint>
- <regex>(en|eth|br|bond|gnv|vxlan|wg|tun)[0-9]+</regex>
+ <regex>^(en|eth|br|bond|gnv|vxlan|wg|tun)[0-9]+$</regex>
</constraint>
</properties>
</leafNode>
@@ -112,36 +111,40 @@
<properties>
<help>Encapsulation of this tunnel interface</help>
<completionHelp>
- <list>gre gre-bridge ipip sit ipip6 ip6ip6 ip6gre</list>
+ <list>gre gre-bridge ip6gre ip6ip6 ipip ipip6 sit</list>
</completionHelp>
<valueHelp>
+ <format>gre</format>
+ <description>Generic Routing Encapsulation</description>
+ </valueHelp>
+ <valueHelp>
<format>gre-bridge</format>
<description>Generic Routing Encapsulation bridge interface</description>
</valueHelp>
<valueHelp>
- <format>ipip</format>
- <description>IP in IP encapsulation</description>
+ <format>ip6gre</format>
+ <description>GRE over IPv6 network</description>
</valueHelp>
<valueHelp>
- <format>sit</format>
- <description>Simple Internet Transition encapsulation</description>
+ <format>ip6ip6</format>
+ <description>IP6 in IP6 encapsulation</description>
</valueHelp>
<valueHelp>
- <format>ipip6</format>
- <description>IP in IP6 encapsulation</description>
+ <format>ipip</format>
+ <description>IP in IP encapsulation</description>
</valueHelp>
<valueHelp>
- <format>ip6ip6</format>
- <description>IP6 in IP6 encapsulation</description>
+ <format>ipip6</format>
+ <description>IP in IP6 encapsulation</description>
</valueHelp>
<valueHelp>
- <format>ip6gre</format>
- <description>GRE over IPv6 network</description>
+ <format>sit</format>
+ <description>Simple Internet Transition encapsulation</description>
</valueHelp>
<constraint>
- <regex>(gre|gre-bridge|ipip|sit|ipip6|ip6ip6|ip6gre)</regex>
+ <regex>^(gre|gre-bridge|ip6gre|ip6ip6|ipip|ipip6|sit)$</regex>
</constraint>
- <constraintErrorMessage>Must be one of 'gre' 'gre-bridge' 'ipip' 'sit' 'ipip6' 'ip6ip6' 'ip6gre'</constraintErrorMessage>
+ <constraintErrorMessage>Invalid encapsulation, must be one of: gre, gre-bridge, ipip, sit, ipip6, ip6ip6, ip6gre</constraintErrorMessage>
</properties>
</leafNode>
<leafNode name="multicast">
@@ -159,7 +162,7 @@
<description>Disable Multicast (default)</description>
</valueHelp>
<constraint>
- <regex>(enable|disable)</regex>
+ <regex>^(enable|disable)$</regex>
</constraint>
<constraintErrorMessage>Must be 'disable' or 'enable'</constraintErrorMessage>
</properties>
@@ -186,6 +189,7 @@
</constraint>
<constraintErrorMessage>TTL must be between 0 and 255</constraintErrorMessage>
</properties>
+ <defaultValue>255</defaultValue>
</leafNode>
<leafNode name="tos">
<properties>
@@ -199,6 +203,7 @@
</constraint>
<constraintErrorMessage>TOS must be between 0 and 99</constraintErrorMessage>
</properties>
+ <defaultValue>inherit</defaultValue>
</leafNode>
<leafNode name="key">
<properties>
@@ -232,6 +237,7 @@
</constraint>
<constraintErrorMessage>key must be between 0-255</constraintErrorMessage>
</properties>
+ <defaultValue>4</defaultValue>
</leafNode>
<leafNode name="flowlabel">
<properties>
@@ -245,6 +251,7 @@
</constraint>
<constraintErrorMessage>Must be 'inherit' or a number</constraintErrorMessage>
</properties>
+ <defaultValue>inherit</defaultValue>
</leafNode>
<leafNode name="hoplimit">
<properties>
@@ -258,6 +265,7 @@
</constraint>
<constraintErrorMessage>hoplimit must be between 0-255</constraintErrorMessage>
</properties>
+ <defaultValue>64</defaultValue>
</leafNode>
<leafNode name="tclass">
<properties>
@@ -271,6 +279,7 @@
</constraint>
<constraintErrorMessage>Must be 'inherit' or a number</constraintErrorMessage>
</properties>
+ <defaultValue>inherit</defaultValue>
</leafNode>
</children>
</node>