From 2a9978fab798b8cc8bc10ac10bfaa0cd77900a61 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 19 Jun 2008 14:14:24 -0700 Subject: Add configuration parameter for BGP MD5 Quagga supports BGP over TCP-MD5 now, so need CLI support. Bugfix: 2661 --- .../bgp/node.tag/neighbor/node.tag/password/node.def | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 templates/protocols/bgp/node.tag/neighbor/node.tag/password/node.def (limited to 'templates') 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" -- cgit v1.2.3