diff options
author | Stig Thormodsrud <stig@vyatta.com> | 2008-02-13 15:24:36 -0800 |
---|---|---|
committer | Stig Thormodsrud <stig@vyatta.com> | 2008-02-13 15:24:36 -0800 |
commit | b0c1f8565931400f9fa3f67bb23bef93576901cd (patch) | |
tree | c7f775cd54ec664393096a2f13bb45d340a4de01 | |
parent | f5f8f70341e08a3c972c90cd52a1f1ef8fdd0495 (diff) | |
download | vyatta-cfg-quagga-b0c1f8565931400f9fa3f67bb23bef93576901cd.tar.gz vyatta-cfg-quagga-b0c1f8565931400f9fa3f67bb23bef93576901cd.zip |
Fix 1513 BGP - peer-port and local-port accept invalid values
-rw-r--r-- | templates/protocols/bgp/node.tag/neighbor/node.tag/port/node.def | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/port/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/port/node.def index ef388c01..4be26de8 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/port/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/port/node.def @@ -1,14 +1,23 @@ type: u32 help: Neighbor's BGP port -syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 4294967294; "remote-as must be between 1 and 4294967294" +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 4294967294; \ + "port must be between 1 and 4294967294" commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" -update:expression: "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\" \ + +update:expression: "\ + 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(../@) port $VAR(@)\" " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ - -c \"no neighbor $VAR(../@) port \" " + +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr \ + -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ + -c \"no neighbor $VAR(../@) port \" " + +comp_help: possible completions: + <1-4294967294> Set neighbor's BGP port |