From 114e65f271b62fd2bb3fac903921e9fe53134da8 Mon Sep 17 00:00:00 2001 From: Viacheslav Date: Tue, 26 Oct 2021 19:39:34 +0000 Subject: bgp: T3945: Add route-map for bgp aggregate-address --- scripts/bgp/vyatta-bgp.pl | 4 ++++ .../ipv4-unicast/aggregate-address/node.tag/route-map/node.def | 6 ++++++ 2 files changed, 10 insertions(+) create mode 100644 templates/protocols/bgp/node.tag/address-family/ipv4-unicast/aggregate-address/node.tag/route-map/node.def diff --git a/scripts/bgp/vyatta-bgp.pl b/scripts/bgp/vyatta-bgp.pl index b0e0af25..faae7126 100755 --- a/scripts/bgp/vyatta-bgp.pl +++ b/scripts/bgp/vyatta-bgp.pl @@ -146,6 +146,10 @@ my %qcom = ( set => 'router bgp #3 ; address-family ipv4 unicast ; aggregate-address #7 ?as-set ?summary-only', del => 'router bgp #3 ; address-family ipv4 unicast ; no aggregate-address #7 ?as-set ?summary-only', }, + 'protocols bgp var address-family ipv4-unicast aggregate-address var route-map' => { + set => 'router bgp #3 ; address-family ipv4 unicast ; no aggregate-address #7 ; aggregate-address #7 route-map #9', + del => 'router bgp #3 ; address-family ipv4 unicast ; no aggregate-address #7 route-map #9 ; aggregate-address #7', + }, 'protocols bgp var address-family ipv4-unicast network' => { set => undef, del => undef, diff --git a/templates/protocols/bgp/node.tag/address-family/ipv4-unicast/aggregate-address/node.tag/route-map/node.def b/templates/protocols/bgp/node.tag/address-family/ipv4-unicast/aggregate-address/node.tag/route-map/node.def new file mode 100644 index 00000000..3d61955a --- /dev/null +++ b/templates/protocols/bgp/node.tag/address-family/ipv4-unicast/aggregate-address/node.tag/route-map/node.def @@ -0,0 +1,6 @@ +type: txt +help: Route map to filter redistributed routes +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) + echo -n ${params[@]##*/} +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist" -- cgit v1.2.3