diff options
author | Stig Thormodsrud <stig@vyatta.com> | 2010-02-17 12:26:24 -0800 |
---|---|---|
committer | Stig Thormodsrud <stig@vyatta.com> | 2010-02-17 12:26:24 -0800 |
commit | 69d1ba455f65ef0f111650cbcb2611f8792ed5d6 (patch) | |
tree | e6a74733f63d83a9136f5e8bd2dcf27068d3657c /templates/protocols/bgp | |
parent | 2705ffbb4fd2a7ca796fa403b38ced66f9b942c5 (diff) | |
download | vyatta-cfg-quagga-69d1ba455f65ef0f111650cbcb2611f8792ed5d6.tar.gz vyatta-cfg-quagga-69d1ba455f65ef0f111650cbcb2611f8792ed5d6.zip |
Fix 5347: committing unsuppress-map for bgp ipv6 neigbor failed
Diffstat (limited to 'templates/protocols/bgp')
-rw-r--r-- | templates/protocols/bgp/node.tag/neighbor/node.tag/unsuppress-map/node.def | 45 |
1 files changed, 39 insertions, 6 deletions
diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/unsuppress-map/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/unsuppress-map/node.def index 1457da75..e3582280 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/unsuppress-map/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/unsuppress-map/node.def @@ -1,17 +1,50 @@ type: txt priority: 719 + help: Set a route-map to selectively unsuppress suppressed routes -comp_help: \1 <txt>\t\troute-map name + +comp_help: possible completions: + <txt> route-map name + +allowed: local -a params + params=( /opt/vyatta/config/active/policy/route-map/* ) + echo -n ${params[@]##*/} + commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" + commit:expression: $VAR(../peer-group/) == ""; "protocols bgp $VAR(../../@) neighbor $VAR(../@): you can't set unsuppress-map for a neighbor in a peer-group" + commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../@) neighbor $VAR(../@): route-map $VAR(@) doesn't exist" + update: if [ -n "$VAR(../remote-as/@)" ]; then peer="remote-as $VAR(../remote-as/@)"; else peer="peer-group $VAR(../peer-group/@)"; fi; - vyatta-vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "neighbor $VAR(../@) $peer" \ - -c "neighbor $VAR(../@) unsuppress-map $VAR(@)" -delete: vyatta-vtysh --noerror -c "configure terminal" -c "router bgp $VAR(../../@)" \ - -c "no neighbor $VAR(../@) unsuppress-map $VAR(@)" + if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../@); then + vyatta-vtysh -c "configure terminal" \ + -c "router bgp $VAR(../../@)" \ + -c "address-family ipv6" \ + -c "neighbor $VAR(../@) $peer" \ + -c "address-family ipv6" \ + -c "neighbor $VAR(../@) unsuppress-map $VAR(@)" + else + vyatta-vtysh -c "configure terminal" \ + -c "router bgp $VAR(../../@)" \ + -c "neighbor $VAR(../@) $peer" \ + -c "neighbor $VAR(../@) unsuppress-map $VAR(@)" + fi; + +delete: if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../@); then + vyatta-vtysh --noerror \ + -c "configure terminal" \ + -c "address-family ipv6" \ + -c "router bgp $VAR(../../@)" \ + -c "address-family ipv6" \ + -c "no neighbor $VAR(../@) unsuppress-map $VAR(@)" + else + vyatta-vtysh --noerror \ + -c "configure terminal" \ + -c "router bgp $VAR(../../@)" \ + -c "no neighbor $VAR(../@) unsuppress-map $VAR(@)" + fi; |