From d27fa6b34ed3e9325d6ae8e4aed6acc14d899562 Mon Sep 17 00:00:00 2001 From: Viacheslav Hletenko Date: Fri, 5 Jun 2020 19:27:20 +0300 Subject: policy: T2389: fix add/del for policy community lists --- scripts/policy/vyatta-policy.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts') 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\""); -- cgit v1.2.3