diff options
author | Mohit Mehta <mohit.mehta@vyatta.com> | 2008-04-18 00:21:20 +0000 |
---|---|---|
committer | Mohit Mehta <mohit.mehta@vyatta.com> | 2008-04-18 00:21:20 +0000 |
commit | aae474df5f2b1ef2563e5f8450f658fe96c54ad1 (patch) | |
tree | b4b2f1f5ca5af93c737689d1b047bb17fc8b4ccb /templates/interfaces/tunnel | |
parent | 69ce2e654600704c520d77dd30c42b9e4aee8f47 (diff) | |
download | vyatta-cfg-system-aae474df5f2b1ef2563e5f8450f658fe96c54ad1.tar.gz vyatta-cfg-system-aae474df5f2b1ef2563e5f8450f658fe96c54ad1.zip |
Fix Bug 3172 set interfaces tunnel <> key <> allowed after tunnel creation
-key not allowed to be set after tunnel creation
Diffstat (limited to 'templates/interfaces/tunnel')
-rw-r--r-- | templates/interfaces/tunnel/node.tag/key/node.def | 5 |
1 files changed, 5 insertions, 0 deletions
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(../@)" |