summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-06-19 14:14:24 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-06-19 14:14:24 -0700
commit2a9978fab798b8cc8bc10ac10bfaa0cd77900a61 (patch)
tree393034ac7cf693a77d42baeaec44469b0edc80ea
parent8959691d5520f0f2cee387eae4354a77dda0fe0a (diff)
downloadvyatta-cfg-quagga-2a9978fab798b8cc8bc10ac10bfaa0cd77900a61.tar.gz
vyatta-cfg-quagga-2a9978fab798b8cc8bc10ac10bfaa0cd77900a61.zip
Add configuration parameter for BGP MD5
Quagga supports BGP over TCP-MD5 now, so need CLI support. Bugfix: 2661
-rw-r--r--templates/protocols/bgp/node.tag/neighbor/node.tag/password/node.def19
1 files changed, 19 insertions, 0 deletions
diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/password/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/password/node.def
new file mode 100644
index 00000000..7cfd25af
--- /dev/null
+++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/password/node.def
@@ -0,0 +1,19 @@
+type: txt
+help: Set BGP MD5 password
+syntax:expression: exec " \
+ if [ `echo $VAR(@) | wc -c` -gt 80 ]; then \
+ echo Password must be 80 characters or less;\
+ exit 1 ; \
+ fi ; "
+update: if [ -n "$VAR(../remote-as/@)" ]; then
+ peer="remote-as $VAR(../remote-as/@)";
+ else
+ peer="peer-group $VAR(../peer-group/@)";
+ fi;
+ ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \
+ -c "router bgp $VAR(../../@)" \
+ -c "neighbor $VAR(../@) $peer" \
+ -c "neighbor $VAR(../@) password $VAR(@)"
+delete: ${vyatta_sbindir}/vyatta-vtysh.pl \
+ -c "configure terminal" -c "router bgp $VAR(../../@)" \
+ -c "no neighbor $VAR(../@) password"