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.def5
1 files changed, 4 insertions, 1 deletions
diff --git a/templates/interfaces/tunnel/node.def b/templates/interfaces/tunnel/node.def
index 720bf64f..1e50a1dd 100644
--- a/templates/interfaces/tunnel/node.def
+++ b/templates/interfaces/tunnel/node.def
@@ -63,8 +63,11 @@ create:
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
+ if [ -n "$VAR(./6rd-relay-prefix/@)" ]; then
+ RP="6rd-relay_prefix $VAR(./6rd-relay-prefix/@)"
+ fi
ip tunnel add $VAR(@) remote $VAR(./remote-ip/@) mode sit
- ip tunnel 6rd dev $VAR(@) 6rd-prefix $VAR(./6rd-prefix/@)
+ ip tunnel 6rd dev $VAR(@) 6rd-prefix $VAR(./6rd-prefix/@) $RP
else
ip tunnel add $VAR(@) local $LIP remote $VAR(./remote-ip/@) mode $VAR(./encapsulation/@) $KEY $TTL $TOS
fi