summaryrefslogtreecommitdiff
path: root/templates/interfaces/tunnel
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-03-03 11:31:25 -0600
committerJohn Southworth <john.southworth@vyatta.com>2011-03-03 11:31:25 -0600
commit459633eabdb1e83efc622d133c71ae1e76a4d223 (patch)
tree4cf88631c130f910b10ac25624f975e2364faaf2 /templates/interfaces/tunnel
parent4d1aee068909429f517e358b252355f7f7226802 (diff)
downloadvyatta-cfg-system-459633eabdb1e83efc622d133c71ae1e76a4d223.tar.gz
vyatta-cfg-system-459633eabdb1e83efc622d133c71ae1e76a4d223.zip
Bugfix 5491: Allow tunnel parameters to be changed on a preconfigured tunnel
Diffstat (limited to 'templates/interfaces/tunnel')
-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