summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--templates/interfaces/tunnel/node.def3
-rw-r--r--templates/interfaces/tunnel/node.tag/6rd-prefix/node.def10
2 files changed, 13 insertions, 0 deletions
diff --git a/templates/interfaces/tunnel/node.def b/templates/interfaces/tunnel/node.def
index 5fbe205e..720bf64f 100644
--- a/templates/interfaces/tunnel/node.def
+++ b/templates/interfaces/tunnel/node.def
@@ -62,6 +62,9 @@ create:
fi
if [ "$VAR(./encapsulation/@)" == "gre" ] && [ -z $VAR(./remote-ip/) ]; then
ip tunnel add $VAR(@) local $LIP mode gre $KEY $TTL $TOS
+ elif [ "$VAR(./encapsulation/@)" == "sit" ] && [ -n "$VAR(./6rd-prefix/@)" ]; then
+ ip tunnel add $VAR(@) remote $VAR(./remote-ip/@) mode sit
+ ip tunnel 6rd dev $VAR(@) 6rd-prefix $VAR(./6rd-prefix/@)
else
ip tunnel add $VAR(@) local $LIP remote $VAR(./remote-ip/@) mode $VAR(./encapsulation/@) $KEY $TTL $TOS
fi
diff --git a/templates/interfaces/tunnel/node.tag/6rd-prefix/node.def b/templates/interfaces/tunnel/node.tag/6rd-prefix/node.def
new file mode 100644
index 00000000..7e899d5d
--- /dev/null
+++ b/templates/interfaces/tunnel/node.tag/6rd-prefix/node.def
@@ -0,0 +1,10 @@
+multi:
+type: ipv6net
+val_help: ipv6net; IPv6 address and prefix length
+help: 6rd network prefix
+
+syntax:expression: exec "/opt/vyatta/sbin/valid_address $VAR(@)"
+
+create:expression: "true"
+update:expression: "false" ; \
+ "6rd-prefix can only be modified at tunnel creation for $VAR(../@)"