From e6c7db7279b7f279217a15b5a3bbe646df0b5645 Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Thu, 21 Feb 2008 14:32:27 -0800 Subject: Fix 2679 aggregate-address "as-set" and/or "summary-only" not sent to the routing engine - work around cli bug 2525 by calling perl script to check node existance --- .../protocols/bgp/node.tag/aggregate-address/node.def | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'templates/protocols/bgp') diff --git a/templates/protocols/bgp/node.tag/aggregate-address/node.def b/templates/protocols/bgp/node.tag/aggregate-address/node.def index bcfffa66..5a188842 100644 --- a/templates/protocols/bgp/node.tag/aggregate-address/node.def +++ b/templates/protocols/bgp/node.tag/aggregate-address/node.def @@ -2,18 +2,23 @@ tag: type: ipv4net help: Configure BGP aggregate entries syntax:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --check-prefix-boundry $VAR(@)" + delete:expression: "touch /tmp/`echo $VAR(@) | sed 's!/!!'`.$PPID" -end:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" -c \"router bgp $VAR(../@)\" \ - -c \"no aggregate-address $VAR(@)\"; \ + +end:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr \ + -c \"configure terminal\" \ + -c \"router bgp $VAR(../@)\" \ + -c \"no aggregate-address $VAR(@)\"; \ if [ -f \"/tmp/`echo $VAR(@) | sed 's!/!!'`.$PPID\" ]; then \ rm -rf /tmp/`echo $VAR(@) | sed 's!/!!'`.$PPID; \ else \ - if [ -n \"$VAR(./as-set/@)\" ]; then \ - COND=\"as-set\"; + if ${vyatta_sbindir}/vyatta_quagga_utils.pl --exists 'protocols bgp $VAR(../@) aggregate-address $VAR(@) as-set' ; then \ + COND=\"as-set\"; \ fi; \ - if [ -n \"$VAR(./summary-only/@)\" ]; then \ + if ${vyatta_sbindir}/vyatta_quagga_utils.pl --exists 'protocols bgp $VAR(../@) aggregate-address $VAR(@) summary-only' ; then \ COND=\"$COND summary-only\"; \ fi; \ - ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../@)\" \ + ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ + -c \"router bgp $VAR(../@)\" \ -c \"aggregate-address $VAR(@) $COND\"; \ fi; " -- cgit v1.2.3