summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2020-06-05 19:27:20 +0300
committerGitHub <noreply@github.com>2020-06-05 18:27:20 +0200
commitd27fa6b34ed3e9325d6ae8e4aed6acc14d899562 (patch)
tree9834aef0c595ef7543a30696dd86caa6530c535e /scripts
parente20b14b969c9bc5cecdc89e139c44d698016724e (diff)
downloadvyatta-cfg-quagga-d27fa6b34ed3e9325d6ae8e4aed6acc14d899562.tar.gz
vyatta-cfg-quagga-d27fa6b34ed3e9325d6ae8e4aed6acc14d899562.zip
policy: T2389: fix add/del for policy community lists
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/policy/vyatta-policy.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/policy/vyatta-policy.pl b/scripts/policy/vyatta-policy.pl
index dbcf16df..cbff3d4b 100755
--- a/scripts/policy/vyatta-policy.pl
+++ b/scripts/policy/vyatta-policy.pl
@@ -50,7 +50,7 @@ sub is_community_list {
my $list = shift;
# Migration to the new syntax blocked by FRR #3308
- my $count = `$VTYSH -c \"show bgp community-list $list\" | grep -c $list`;
+ my $count = `$VTYSH -c \"show bgp community-list $list detail\" | grep -c $list`;
if ( $count > 0 ) {
return 1;
}
@@ -62,7 +62,7 @@ sub is_community_list {
sub is_extcommunity_list {
my $list = shift;
- my $count = `$VTYSH -c \"show bgp extcommunity-list $list\" | grep -c $list`;
+ my $count = `$VTYSH -c \"show bgp extcommunity-list $list detail\" | grep -c $list`;
if ( $count > 0 ) {
return 1;
}
@@ -79,7 +79,7 @@ sub update_ext_community_list {
# remove the old rules
if ( is_extcommunity_list($name) ) {
- my $clist = `$VTYSH -c \"show bgp extcommunity-list $name\" | grep -v \"expanded list $name\"`;
+ my $clist = `$VTYSH -c \"show bgp extcommunity-list $name detail\" | grep -v \"expanded list $name\"`;
my @oldrules = split(/\n/, $clist);
foreach my $oldrule (@oldrules) {
system("$VTYSH -c \"conf t\" -c \"no bgp extcommunity-list expanded $name $oldrule\"");