summaryrefslogtreecommitdiff
path: root/interface-definitions
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-07-25 11:49:05 +0200
committerChristian Poessinger <christian@poessinger.com>2021-07-25 21:10:25 +0200
commit7a85dbfb8b97dade658e8213099fc4995ae62ea1 (patch)
tree0223edb96033a250674ce83b4de9cda419f7ef99 /interface-definitions
parente4d697b1d3aad0cb8e81f4c36bcaa4c089195f43 (diff)
downloadvyos-1x-7a85dbfb8b97dade658e8213099fc4995ae62ea1.tar.gz
vyos-1x-7a85dbfb8b97dade658e8213099fc4995ae62ea1.zip
ifconfig: backport ifconfig framework from 1.4 to support new tunnel options
It is easier to backport the entire vyos.ifconfig library from 1.4 instead of backporting single pieces which are required to add new feature to the tunnel interface section. In addition that both libraries are now back in sync it will become much easier to backport any other new feature introduced in VyOS 1.4!
Diffstat (limited to 'interface-definitions')
-rw-r--r--interface-definitions/interfaces-l2tpv3.xml.in34
-rw-r--r--interface-definitions/interfaces-tunnel.xml.in55
2 files changed, 9 insertions, 80 deletions
diff --git a/interface-definitions/interfaces-l2tpv3.xml.in b/interface-definitions/interfaces-l2tpv3.xml.in
index db2a7d39d..2edf08070 100644
--- a/interface-definitions/interfaces-l2tpv3.xml.in
+++ b/interface-definitions/interfaces-l2tpv3.xml.in
@@ -55,22 +55,7 @@
</leafNode>
#include <include/interface/interface-ipv4-options.xml.i>
#include <include/interface/interface-ipv6-options.xml.i>
- <leafNode name="local-ip">
- <properties>
- <help>Local IP address for L2TPv3 tunnel</help>
- <valueHelp>
- <format>ipv4</format>
- <description>Local IPv4 address of tunnel</description>
- </valueHelp>
- <valueHelp>
- <format>ipv6</format>
- <description>Local IPv6 address of tunnel</description>
- </valueHelp>
- <constraint>
- <validator name="ip-address"/>
- </constraint>
- </properties>
- </leafNode>
+ #include <include/source-address-ipv4-ipv6.xml.i>
#include <include/interface/interface-mtu-68-16000.xml.i>
<leafNode name="mtu">
<defaultValue>1488</defaultValue>
@@ -99,22 +84,7 @@
</constraint>
</properties>
</leafNode>
- <leafNode name="remote-ip">
- <properties>
- <help>Remote IP address for L2TPv3 tunnel</help>
- <valueHelp>
- <format>ipv4</format>
- <description>Remote IPv4 address of tunnel</description>
- </valueHelp>
- <valueHelp>
- <format>ipv6</format>
- <description>Remote IPv6 address of tunnel</description>
- </valueHelp>
- <constraint>
- <validator name="ip-address"/>
- </constraint>
- </properties>
- </leafNode>
+ #include <include/tunnel-remote.xml.i>
<leafNode name="session-id">
<properties>
<help>Session identifier</help>
diff --git a/interface-definitions/interfaces-tunnel.xml.in b/interface-definitions/interfaces-tunnel.xml.in
index 2b425f865..3a9454e91 100644
--- a/interface-definitions/interfaces-tunnel.xml.in
+++ b/interface-definitions/interfaces-tunnel.xml.in
@@ -27,50 +27,9 @@
</leafNode>
#include <include/interface/interface-ipv4-options.xml.i>
#include <include/interface/interface-ipv6-options.xml.i>
- <leafNode name="local-ip">
- <properties>
- <help>Local IP address for this tunnel</help>
- <valueHelp>
- <format>ipv4</format>
- <description>Local IPv4 address for this tunnel</description>
- </valueHelp>
- <valueHelp>
- <format>ipv6</format>
- <description>Local IPv6 address for this tunnel [NOTICE: unavailable for mGRE tunnels]</description>
- </valueHelp>
- <completionHelp>
- <script>${vyos_completion_dir}/list_local_ips.sh --both</script>
- </completionHelp>
- <constraint>
- <validator name="ip-address"/>
- </constraint>
- </properties>
- </leafNode>
- <leafNode name="remote-ip">
- <properties>
- <help>Remote IP address for this tunnel</help>
- <valueHelp>
- <format>ipv4</format>
- <description>Remote IPv4 address for this tunnel</description>
- </valueHelp>
- <valueHelp>
- <format>ipv6</format>
- <description>Remote IPv6 address for this tunnel</description>
- </valueHelp>
- <constraint>
- <!-- does it need fixing/changing to be more restrictive ? -->
- <validator name="ip-address"/>
- </constraint>
- </properties>
- </leafNode>
- <leafNode name="source-interface">
- <properties>
- <help>Physical Interface used for underlaying traffic</help>
- <completionHelp>
- <script>${vyos_completion_dir}/list_interfaces.py</script>
- </completionHelp>
- </properties>
- </leafNode>
+ #include <include/source-address-ipv4-ipv6.xml.i>
+ #include <include/tunnel-remote.xml.i>
+ #include <include/source-interface.xml.i>
<leafNode name="6rd-prefix">
<properties>
<help>6rd network prefix</help>
@@ -114,14 +73,14 @@
<properties>
<help>Encapsulation of this tunnel interface</help>
<completionHelp>
- <list>gre gre-bridge ip6gre ip6ip6 ipip ipip6 sit</list>
+ <list>gre gretap ip6gre ip6ip6 ipip ipip6 sit</list>
</completionHelp>
<valueHelp>
<format>gre</format>
<description>Generic Routing Encapsulation</description>
</valueHelp>
<valueHelp>
- <format>gre-bridge</format>
+ <format>gretap</format>
<description>Generic Routing Encapsulation bridge interface</description>
</valueHelp>
<valueHelp>
@@ -145,9 +104,9 @@
<description>Simple Internet Transition encapsulation</description>
</valueHelp>
<constraint>
- <regex>^(gre|gre-bridge|ip6gre|ip6ip6|ipip|ipip6|sit)$</regex>
+ <regex>^(gre|gretap|ip6gre|ip6ip6|ipip|ipip6|sit)$</regex>
</constraint>
- <constraintErrorMessage>Invalid encapsulation, must be one of: gre, gre-bridge, ipip, sit, ipip6, ip6ip6, ip6gre</constraintErrorMessage>
+ <constraintErrorMessage>Invalid encapsulation, must be one of: gre, gretap, ipip, sit, ipip6, ip6ip6, ip6gre</constraintErrorMessage>
</properties>
</leafNode>
<leafNode name="multicast">