diff options
author | Stig Thormodsrud <stig@vyatta.com> | 2011-01-25 12:03:07 -0800 |
---|---|---|
committer | Stig Thormodsrud <stig@vyatta.com> | 2011-01-25 14:37:01 -0800 |
commit | 2681608ec175408499c64fb25a1b73d0c52f45a2 (patch) | |
tree | cf7b72cb20768b4bedbcb89bf594df219ab28960 | |
parent | 2349b59037f8cbbd1842b4a266d2baeba441ab54 (diff) | |
download | vyatta-cfg-2681608ec175408499c64fb25a1b73d0c52f45a2.tar.gz vyatta-cfg-2681608ec175408499c64fb25a1b73d0c52f45a2.zip |
Fix list_vrrp_sync_group_members() to just include requested group.
(cherry picked from commit 55e621e5b351913bf735477d00ca554c5a19c4d6)
-rwxr-xr-x | lib/Vyatta/Keepalived.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Vyatta/Keepalived.pm b/lib/Vyatta/Keepalived.pm index 28a6f53..88a0564 100755 --- a/lib/Vyatta/Keepalived.pm +++ b/lib/Vyatta/Keepalived.pm @@ -413,14 +413,14 @@ sub list_all_vrrp_sync_grps { } sub list_vrrp_sync_group_members { - my ($sync_group) = @_; + my ($sync_grp_match) = @_; my @members = (); my @vrrp_intfs = list_vrrp_intf(); foreach my $vrrp_intf (@vrrp_intfs) { my @vrrp_groups = list_vrrp_group($vrrp_intf); foreach my $vrrp_group (@vrrp_groups) { my $sync_grp = list_vrrp_sync_group($vrrp_intf, $vrrp_group); - if (defined $sync_grp) { + if (defined $sync_grp and $sync_grp eq $sync_grp_match) { push @members, 'vyatta-' . $vrrp_intf. '-' . $vrrp_group; } } |