From d98e01da6b1805e8e1d53f631ea6f4ea46d0d218 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 15 Nov 2020 10:35:39 +0100 Subject: tunnel: T3072: migrate to get_config_dict() --- interface-definitions/interfaces-tunnel.xml.in | 36 ++++++++++++++++---------- 1 file changed, 23 insertions(+), 13 deletions(-) (limited to 'interface-definitions') diff --git a/interface-definitions/interfaces-tunnel.xml.in b/interface-definitions/interfaces-tunnel.xml.in index c3f178d59..bf588a075 100644 --- a/interface-definitions/interfaces-tunnel.xml.in +++ b/interface-definitions/interfaces-tunnel.xml.in @@ -112,36 +112,40 @@ Encapsulation of this tunnel interface - gre gre-bridge ipip sit ipip6 ip6ip6 ip6gre + gre gre-bridge ip6gre ip6ip6 ipip ipip6 sit + + gre + Generic Routing Encapsulation + gre-bridge Generic Routing Encapsulation bridge interface - ipip - IP in IP encapsulation + ip6gre + GRE over IPv6 network - sit - Simple Internet Transition encapsulation + ip6ip6 + IP6 in IP6 encapsulation - ipip6 - IP in IP6 encapsulation + ipip + IP in IP encapsulation - ip6ip6 - IP6 in IP6 encapsulation + ipip6 + IP in IP6 encapsulation - ip6gre - GRE over IPv6 network + sit + Simple Internet Transition encapsulation - (gre|gre-bridge|ipip|sit|ipip6|ip6ip6|ip6gre) + ^(gre|gre-bridge|ip6gre|ip6ip6|ipip|ipip6|sit)$ - Must be one of 'gre' 'gre-bridge' 'ipip' 'sit' 'ipip6' 'ip6ip6' 'ip6gre' + Invalid encapsulation mode, must be one of: gre gre-bridge ip6gre ip6ip6 ipip ipip6 sit @@ -186,6 +190,7 @@ TTL must be between 0 and 255 + 255 @@ -199,6 +204,7 @@ TOS must be between 0 and 99 + inherit @@ -232,6 +238,7 @@ key must be between 0-255 + 4 @@ -245,6 +252,7 @@ Must be 'inherit' or a number + inherit @@ -258,6 +266,7 @@ hoplimit must be between 0-255 + 64 @@ -271,6 +280,7 @@ Must be 'inherit' or a number + inherit -- cgit v1.2.3 From 246808bc33a2343827ab2b4d76ae449fcc549ac9 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Fri, 20 Nov 2020 12:22:44 +0100 Subject: tunnel: T3072: xml: harden regex validators --- interface-definitions/interfaces-tunnel.xml.in | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'interface-definitions') diff --git a/interface-definitions/interfaces-tunnel.xml.in b/interface-definitions/interfaces-tunnel.xml.in index bf588a075..b322374b3 100644 --- a/interface-definitions/interfaces-tunnel.xml.in +++ b/interface-definitions/interfaces-tunnel.xml.in @@ -39,7 +39,6 @@ - @@ -104,7 +103,7 @@ - (en|eth|br|bond|gnv|vxlan|wg|tun)[0-9]+ + ^(en|eth|br|bond|gnv|vxlan|wg|tun)[0-9]+$ @@ -145,7 +144,7 @@ ^(gre|gre-bridge|ip6gre|ip6ip6|ipip|ipip6|sit)$ - Invalid encapsulation mode, must be one of: gre gre-bridge ip6gre ip6ip6 ipip ipip6 sit + Invalid encapsulation, must be one of: gre, gre-bridge, ipip, sit, ipip6, ip6ip6, ip6gre @@ -163,7 +162,7 @@ Disable Multicast (default) - (enable|disable) + ^(enable|disable)$ Must be 'disable' or 'enable' -- cgit v1.2.3