summaryrefslogtreecommitdiff
path: root/templates/interfaces/tunnel
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2008-04-30 11:19:18 -0700
committerStig Thormodsrud <stig@vyatta.com>2008-04-30 11:19:18 -0700
commitc8fecfb40e0e65823f3429e0f4787bcef4109c8c (patch)
tree1f58d1c64b5a1cf677177fd18a43938b47794e47 /templates/interfaces/tunnel
parentda2f87025f22db0e357b5437ae7d4baf57717fbd (diff)
downloadvyatta-cfg-quagga-c8fecfb40e0e65823f3429e0f4787bcef4109c8c.tar.gz
vyatta-cfg-quagga-c8fecfb40e0e65823f3429e0f4787bcef4109c8c.zip
Fix 3139 Check for previous authentication type before allowing another
Diffstat (limited to 'templates/interfaces/tunnel')
-rw-r--r--templates/interfaces/tunnel/node.tag/ip/rip/authentication/md5/node.def5
-rw-r--r--templates/interfaces/tunnel/node.tag/ip/rip/authentication/plaintext-password/node.def20
2 files changed, 15 insertions, 10 deletions
diff --git a/templates/interfaces/tunnel/node.tag/ip/rip/authentication/md5/node.def b/templates/interfaces/tunnel/node.tag/ip/rip/authentication/md5/node.def
index e1819c01..8d165fe6 100644
--- a/templates/interfaces/tunnel/node.tag/ip/rip/authentication/md5/node.def
+++ b/templates/interfaces/tunnel/node.tag/ip/rip/authentication/md5/node.def
@@ -1,5 +1,8 @@
tag:
type: u32
help: Set MD5 authentication key ID
-syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; "ID must be between 1 and 255"
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; \
+ "ID must be between 1 and 255"
+commit:expression: $VAR(../plaintext-password/) == "" ; \
+ "plaintext-password already set"
diff --git a/templates/interfaces/tunnel/node.tag/ip/rip/authentication/plaintext-password/node.def b/templates/interfaces/tunnel/node.tag/ip/rip/authentication/plaintext-password/node.def
index 593c7690..aaaae83e 100644
--- a/templates/interfaces/tunnel/node.tag/ip/rip/authentication/plaintext-password/node.def
+++ b/templates/interfaces/tunnel/node.tag/ip/rip/authentication/plaintext-password/node.def
@@ -6,15 +6,17 @@ syntax:expression: exec " \
exit 1 ; \
fi ; "
-update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl \
- -c \"configure terminal\" -c \"interface $VAR(../../../../@)\" \
- -c \"ip rip authentication mode text\" \
- -c \"ip rip authentication string $VAR(@)\"; "
+commit:expression: $VAR(../md5/) == "" ; "md5 password already set"
+
+update: ${vyatta_sbindir}/vyatta-vtysh.pl \
+ -c "configure terminal" -c "interface $VAR(../../../../@)" \
+ -c "ip rip authentication mode text" \
+ -c "ip rip authentication string $VAR(@)"
+
+delete: ${vyatta_sbindir}/vyatta-vtysh.pl \
+ -c "configure terminal" -c "interface $VAR(../../../../@)" \
+ -c "no ip rip authentication mode" \
+ -c "no ip rip authentication string $VAR(@)"
-delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl \
- -c \"configure terminal\" -c \"interface $VAR(../../../../@)\" \
- -c \"no ip rip authentication mode\" \
- -c \"no ip rip authentication string $VAR(@)\"; "
comp_help: possible completions:
<text> Password (16 characters or less)
-