diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2020-06-05 19:27:20 +0300 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-07-07 18:09:10 +0200 |
commit | fb2a6370d82ccd68626f83b75defb2a844301d8a (patch) | |
tree | 6a8f08e461a280e3a0d2ea3d413c67edc5228df8 | |
parent | f3c6c9a619dcc5fb0fed7e53004c37339c8beaba (diff) | |
download | vyatta-cfg-quagga-fb2a6370d82ccd68626f83b75defb2a844301d8a.tar.gz vyatta-cfg-quagga-fb2a6370d82ccd68626f83b75defb2a844301d8a.zip |
policy: T2389: fix add/del for policy community lists
(cherry picked from commit d27fa6b34ed3e9325d6ae8e4aed6acc14d899562)
-rwxr-xr-x | scripts/policy/vyatta-policy.pl | 6 |
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\""); |