summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2018-11-18 17:52:49 +0100
committerDaniil Baturin <daniil@baturin.org>2018-11-18 17:52:49 +0100
commit355d403b3b492b07bfc405b7d7dfa0051a2ab7c2 (patch)
tree50709093c50525ae789c4c3b5e0a3fe10e5a5bb2 /templates
parent29287219854913b9f1ab6661d8af786b0fd68434 (diff)
downloadvyatta-cfg-system-355d403b3b492b07bfc405b7d7dfa0051a2ab7c2.tar.gz
vyatta-cfg-system-355d403b3b492b07bfc405b7d7dfa0051a2ab7c2.zip
T1000: partially fix the broken 6rd implementation.
Diffstat (limited to 'templates')
-rw-r--r--templates/interfaces/tunnel/node.def8
-rw-r--r--templates/interfaces/tunnel/node.tag/6rd-prefix/node.def3
-rw-r--r--templates/interfaces/tunnel/node.tag/6rd-relay-prefix/node.def3
3 files changed, 9 insertions, 5 deletions
diff --git a/templates/interfaces/tunnel/node.def b/templates/interfaces/tunnel/node.def
index c6e3b447..de5431a3 100644
--- a/templates/interfaces/tunnel/node.def
+++ b/templates/interfaces/tunnel/node.def
@@ -16,7 +16,13 @@ commit:expression:
exec "
if [ $VAR(./encapsulation/@) = gre ] && [ ! -n \"$VAR(./remote-ip/)\" ]; then \
echo \"No remote-ip configured for $VAR(@), tunnel can only be used for mGRE.\"; \
- fi; \
+ fi; \
+ if [ -n \"$VAR(./6rd-prefix/)\" ]; then \
+ if [ $VAR(./encapsulation/@) != sit ]; then \
+ echo \"6rd-prefix can only be set for SIT tunnels\"; \
+ exit 1; \
+ fi \
+ fi; \
if [ $VAR(./encapsulation/@) != gre ] && [ ! -n \"$VAR(./remote-ip/)\" ]; then \
echo \"Must configure the tunnel remote-ip for $VAR(@)\"; \
exit 1; \
diff --git a/templates/interfaces/tunnel/node.tag/6rd-prefix/node.def b/templates/interfaces/tunnel/node.tag/6rd-prefix/node.def
index 7e899d5d..c5f7f02c 100644
--- a/templates/interfaces/tunnel/node.tag/6rd-prefix/node.def
+++ b/templates/interfaces/tunnel/node.tag/6rd-prefix/node.def
@@ -1,9 +1,8 @@
-multi:
type: ipv6net
val_help: ipv6net; IPv6 address and prefix length
help: 6rd network prefix
-syntax:expression: exec "/opt/vyatta/sbin/valid_address $VAR(@)"
+syntax:expression: exec "ipaddrcheck --verbose --is-ipv6-net $VAR(@)"
create:expression: "true"
update:expression: "false" ; \
diff --git a/templates/interfaces/tunnel/node.tag/6rd-relay-prefix/node.def b/templates/interfaces/tunnel/node.tag/6rd-relay-prefix/node.def
index 0f877e2d..224c3b7e 100644
--- a/templates/interfaces/tunnel/node.tag/6rd-relay-prefix/node.def
+++ b/templates/interfaces/tunnel/node.tag/6rd-relay-prefix/node.def
@@ -1,9 +1,8 @@
-multi:
type: ipv4net
val_help: ipv4net; IPv4 prefix of interface for 6rd
help: 6rd relay prefix
-syntax:expression: exec "/opt/vyatta/sbin/valid_address $VAR(@)"
+syntax:expression: exec "ipaddrcheck --verbose --is-ipv4-net $VAR(@)"
create:expression: "true"
update:expression: "false" ; \