summaryrefslogtreecommitdiff
path: root/templates/interfaces/tunnel/node.def
diff options
context:
space:
mode:
Diffstat (limited to 'templates/interfaces/tunnel/node.def')
-rw-r--r--templates/interfaces/tunnel/node.def8
1 files changed, 7 insertions, 1 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; \