summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2008-04-09 14:05:30 -0700
committerStig Thormodsrud <stig@vyatta.com>2008-04-09 14:05:30 -0700
commit5a040d2ba78f633b7633f8fded6ac7e14a9d453b (patch)
treee5315c5b51d9cc7380c62d7cec7036045d205086 /templates
parent67c9ab299d135e8866e81868843197dd3aa78d02 (diff)
downloadvyatta-cfg-quagga-5a040d2ba78f633b7633f8fded6ac7e14a9d453b.tar.gz
vyatta-cfg-quagga-5a040d2ba78f633b7633f8fded6ac7e14a9d453b.zip
Fix 3126: ospf virtual-link authentication types should not be able to be coexisted in the config
Diffstat (limited to 'templates')
-rw-r--r--templates/protocols/ospf/area/node.tag/virtual-link/node.tag/authentication/md5/node.def26
-rw-r--r--templates/protocols/ospf/area/node.tag/virtual-link/node.tag/authentication/plaintext-password/node.def21
2 files changed, 26 insertions, 21 deletions
diff --git a/templates/protocols/ospf/area/node.tag/virtual-link/node.tag/authentication/md5/node.def b/templates/protocols/ospf/area/node.tag/virtual-link/node.tag/authentication/md5/node.def
index c2af0dd3..e81d00be 100644
--- a/templates/protocols/ospf/area/node.tag/virtual-link/node.tag/authentication/md5/node.def
+++ b/templates/protocols/ospf/area/node.tag/virtual-link/node.tag/authentication/md5/node.def
@@ -1,14 +1,16 @@
help: Configure MD5 key id
-create:expression: "${vyatta_sbindir}/vyatta-vtysh.pl \
- -c \"configure terminal\" \
- -c \"router ospf\" \
- -c \"no area $VAR(../../../@) virtual-link $VAR(../../@) \
- authentication-key\" \
- -c \"area $VAR(../../../@) virtual-link $VAR(../../@) \
- authentication message-digest\"; "
+commit:expression: $VAR(../plaintext-password/) == "" ; "plaintext-password already set"
-delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl \
- -c \"configure terminal\" \
- -c \"router ospf\" \
- -c \"area $VAR(../../../@) virtual-link $VAR(../../@) \
- authentication null\"; "
+create: ${vyatta_sbindir}/vyatta-vtysh.pl \
+ -c "configure terminal" \
+ -c "router ospf" \
+ -c "no area $VAR(../../../@) virtual-link $VAR(../../@) \
+ authentication-key" \
+ -c "area $VAR(../../../@) virtual-link $VAR(../../@) \
+ authentication message-digest";
+
+delete: ${vyatta_sbindir}/vyatta-vtysh.pl \
+ -c "configure terminal" \
+ -c "router ospf" \
+ -c "area $VAR(../../../@) virtual-link $VAR(../../@) \
+ authentication null";
diff --git a/templates/protocols/ospf/area/node.tag/virtual-link/node.tag/authentication/plaintext-password/node.def b/templates/protocols/ospf/area/node.tag/virtual-link/node.tag/authentication/plaintext-password/node.def
index ab268f98..6b024a35 100644
--- a/templates/protocols/ospf/area/node.tag/virtual-link/node.tag/authentication/plaintext-password/node.def
+++ b/templates/protocols/ospf/area/node.tag/virtual-link/node.tag/authentication/plaintext-password/node.def
@@ -1,20 +1,23 @@
type: txt
help: Configure plain text password
+
syntax:expression: exec " \
if [ `echo -n $VAR(@) | wc -c` -gt 8 ]; then \
echo Password must be 8 characters or less ; \
exit 1 ; \
fi ; "
-update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl \
- -c \"configure terminal\" -c \"router ospf\" \
- -c \"area $VAR(../../../@) virtual-link $VAR(../../@) \
- authentication authentication-key $VAR(@) \"; "
+commit:expression: $VAR(../md5/) == "" ; "md5 password already set"
+
+update: ${vyatta_sbindir}/vyatta-vtysh.pl \
+ -c "configure terminal" -c "router ospf" \
+ -c "area $VAR(../../../@) virtual-link $VAR(../../@) \
+ authentication authentication-key $VAR(@) "
-delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl \
- -c \"configure terminal\" -c \"router ospf\" \
- -c \"no area $VAR(../../../@) virtual-link $VAR(../../@) \
- authentication authentication-key \"; "
+delete: ${vyatta_sbindir}/vyatta-vtysh.pl \
+ -c "configure terminal" -c "router ospf" \
+ -c "no area $VAR(../../../@) virtual-link $VAR(../../@) \
+ authentication authentication-key";
comp_help: possible completions:
- <text> Plain text password (8 characters or less)
+ <text> Plain text password (8 characters or less)