diff options
Diffstat (limited to 'templates/interfaces/tunnel')
9 files changed, 22 insertions, 9 deletions
diff --git a/templates/interfaces/tunnel/node.def b/templates/interfaces/tunnel/node.def index 9ebb581c..aefd5935 100644 --- a/templates/interfaces/tunnel/node.def +++ b/templates/interfaces/tunnel/node.def @@ -1,6 +1,6 @@ tag: type: txt -help: Configure a tunnel interface +help: Set tunnel interface syntax:expression: $VAR(@) in "tun0", "tun1", "tun2", "tun3", "tun4", "tun5", "tun6", "tun7", "tun8", "tun9" ; "Must be (tun0 - tun9)" commit:expression: $VAR(./local-ip/) != "" ; \ diff --git a/templates/interfaces/tunnel/node.tag/address/node.def b/templates/interfaces/tunnel/node.tag/address/node.def index 4d91c9ba..07ea4a0e 100644 --- a/templates/interfaces/tunnel/node.tag/address/node.def +++ b/templates/interfaces/tunnel/node.tag/address/node.def @@ -1,6 +1,6 @@ multi: type: txt -help: Configure an IP address for this interface +help: Set an IP address for this interface syntax:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr $VAR(@) --dev $VAR(../@)"; "Invalid IP address/prefix [$VAR(@)] for interface $VAR(../@)" @@ -9,4 +9,4 @@ update:expression: "sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-update delete:expression: "sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-delete $VAR(@) --dev $VAR(../@)"; "Error deleting address $VAR(@) on interface $VAR(../@)" comp_help:Possible completions: - <IP address>/<prefix length> Set the IP address and prefix length + <x.x.x.x/x> Set the IP address and prefix length diff --git a/templates/interfaces/tunnel/node.tag/description/node.def b/templates/interfaces/tunnel/node.tag/description/node.def index e00ed857..b53ae684 100644 --- a/templates/interfaces/tunnel/node.tag/description/node.def +++ b/templates/interfaces/tunnel/node.tag/description/node.def @@ -1,2 +1,2 @@ type: txt -help: Description of this tunnel interface +help: Set description of this tunnel interface diff --git a/templates/interfaces/tunnel/node.tag/key/node.def b/templates/interfaces/tunnel/node.tag/key/node.def index ae244529..1ece7642 100644 --- a/templates/interfaces/tunnel/node.tag/key/node.def +++ b/templates/interfaces/tunnel/node.tag/key/node.def @@ -2,6 +2,11 @@ type: u32 help: Set the tunnel key syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 999999; \ "Must be between 0-999999 for $VAR(../@)" +syntax:expression: exec " \ + if [ -n \"`sudo ip tunnel show $VAR(../@) | grep $VAR(../@) `\" ]; then \ + echo Key can only be set at tunnel creation for $VAR(../@); \ + exit 1 ; \ + fi ; " commit:expression: $VAR(../encapsulation/@) in "gre" ; \ "Key only valid for GRE for $VAR(../@)" diff --git a/templates/interfaces/tunnel/node.tag/local-ip/node.def b/templates/interfaces/tunnel/node.tag/local-ip/node.def index 6cdaf2a5..9f9d52c0 100644 --- a/templates/interfaces/tunnel/node.tag/local-ip/node.def +++ b/templates/interfaces/tunnel/node.tag/local-ip/node.def @@ -1,6 +1,10 @@ type: ipv4 -help: Enter the local IP address for this tunnel +help: Set the local IP address for this tunnel syntax:expression: exec "if [ -z \"`ip addr list | grep $VAR(@) `\" ]; then \ echo IP address $VAR(@) doesn\\'t exist on this system ; \ exit 1 ; \ fi ; " +create:expression: "true" +update:expression: "false" ; \ + "Local IP can only be set at tunnel creation for $VAR(../@)" + diff --git a/templates/interfaces/tunnel/node.tag/mtu/node.def b/templates/interfaces/tunnel/node.tag/mtu/node.def index 47dc34cf..f1fdf39b 100644 --- a/templates/interfaces/tunnel/node.tag/mtu/node.def +++ b/templates/interfaces/tunnel/node.tag/mtu/node.def @@ -1,5 +1,5 @@ type: u32 -help: Set the tunnel MTU +help: Set the tunnel Maximum Transmission Unit (MTU) syntax:expression: $VAR(@) >= 64 && $VAR(@) <= 8024; "Must be between 64-8024" update:expression: "sudo ip link set $VAR(../@) mtu $VAR(@)" delete:expression: "sudo ip link set $VAR(../@) mtu 1476" diff --git a/templates/interfaces/tunnel/node.tag/remote-ip/node.def b/templates/interfaces/tunnel/node.tag/remote-ip/node.def index e5ee1ffd..e8bb2ef0 100644 --- a/templates/interfaces/tunnel/node.tag/remote-ip/node.def +++ b/templates/interfaces/tunnel/node.tag/remote-ip/node.def @@ -1,2 +1,6 @@ type: ipv4 -help: Enter the remote IP address for this tunnel +help: Set the remote IP address for this tunnel +create:expression: "true" +update:expression: "false" ; \ + "Remote IP can only be set at tunnel creation for $VAR(../@)" + diff --git a/templates/interfaces/tunnel/node.tag/tos/node.def b/templates/interfaces/tunnel/node.tag/tos/node.def index 8cc69360..1f739966 100644 --- a/templates/interfaces/tunnel/node.tag/tos/node.def +++ b/templates/interfaces/tunnel/node.tag/tos/node.def @@ -1,5 +1,5 @@ type: u32 -help: Set the tunnel type of service +help: Set the tunnel Type of Service (TOS) syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 99; "Must be between 0-99" update:expression: "sudo ip tunnel change $VAR(../@) tos $VAR(@)" delete:expression: "sudo ip tunnel change $VAR(../@) tos inherit" diff --git a/templates/interfaces/tunnel/node.tag/ttl/node.def b/templates/interfaces/tunnel/node.tag/ttl/node.def index 1d194508..298c4d61 100644 --- a/templates/interfaces/tunnel/node.tag/ttl/node.def +++ b/templates/interfaces/tunnel/node.tag/ttl/node.def @@ -1,5 +1,5 @@ type: u32 -help: Set the tunnel time to live +help: Set the tunnel time to live field default: 255 syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 255; "Must be between 0-255" update:expression: "sudo ip tunnel change $VAR(../@) ttl $VAR(@)" |