summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--templates/interfaces/tunnel/node.tag/local-ip/node.def8
-rw-r--r--templates/interfaces/tunnel/node.tag/multicast/node.def11
-rw-r--r--templates/interfaces/tunnel/node.tag/remote-ip/node.def8
3 files changed, 16 insertions, 11 deletions
diff --git a/templates/interfaces/tunnel/node.tag/local-ip/node.def b/templates/interfaces/tunnel/node.tag/local-ip/node.def
index 809c4c6f..390d2767 100644
--- a/templates/interfaces/tunnel/node.tag/local-ip/node.def
+++ b/templates/interfaces/tunnel/node.tag/local-ip/node.def
@@ -1,3 +1,4 @@
+priority: 385
type: ipv4
help: Local IP address for this tunnel [REQUIRED]
@@ -5,7 +6,6 @@ syntax:expression: exec \
"/opt/vyatta/sbin/local_ip $VAR(@) || \
echo Warning! IP address $VAR(@) doesn\\'t exist on this system"
-create:expression: "true"
-update:expression: "false" ; \
- "Local IP can only be set at tunnel creation for $VAR(../@)"
-
+update: if [ "$VAR(../encapsulation/@)" != "gre-bridge" ]; then
+ sudo ip tunnel cha $VAR(../@) local $VAR(@)
+ fi
diff --git a/templates/interfaces/tunnel/node.tag/multicast/node.def b/templates/interfaces/tunnel/node.tag/multicast/node.def
index 9f675b0e..8f5e2ede 100644
--- a/templates/interfaces/tunnel/node.tag/multicast/node.def
+++ b/templates/interfaces/tunnel/node.tag/multicast/node.def
@@ -1,3 +1,4 @@
+priority: 385
type: txt
help: Multicast operation over tunnel
default: "disable"
@@ -8,6 +9,10 @@ allowed: echo enable disable
syntax:expression: $VAR(@) in "enable", "disable"; \
"Must be 'disable' or 'enable'"
-create:expression: "true"
-update:expression: "false" ; \
- "Multicast should be set at tunnel creation for $VAR(../@)"
+update:if [ "$VAR(../encapsulation/@)" != "gre-bridge" ]; then
+ if [ "$VAR(@)" == "enable" ]; then
+ sudo ip link set $VAR(../@) multicast on allmulticast on
+ else
+ sudo ip link set $VAR(../@) multicast off allmulticast off
+ fi
+ fi
diff --git a/templates/interfaces/tunnel/node.tag/remote-ip/node.def b/templates/interfaces/tunnel/node.tag/remote-ip/node.def
index 30f4e4d4..85ee0285 100644
--- a/templates/interfaces/tunnel/node.tag/remote-ip/node.def
+++ b/templates/interfaces/tunnel/node.tag/remote-ip/node.def
@@ -1,6 +1,6 @@
+priority: 385
type: ipv4
help: Remote IP address for this tunnel [REQUIRED]
-create:expression: "true"
-update:expression: "false" ; \
- "Remote IP can only be set at tunnel creation for $VAR(../@)"
-
+update: if [ "$VAR(../encapsulation/@)" != "gre-bridge" ]; then
+ sudo ip tunnel cha $VAR(../@) remote $VAR(@)
+ fi