From d7c955f842d216dbf76700fc198c2a82f6807787 Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Mon, 2 Aug 2010 17:16:44 -0700 Subject: use listEffectiveNodes() from new API --- scripts/zone-mgmt/vyatta-zone.pl | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/scripts/zone-mgmt/vyatta-zone.pl b/scripts/zone-mgmt/vyatta-zone.pl index c6771e25..f8d9b5a5 100755 --- a/scripts/zone-mgmt/vyatta-zone.pl +++ b/scripts/zone-mgmt/vyatta-zone.pl @@ -286,7 +286,8 @@ to its $zone_chain chain failed [$error]" if $error; my @all_zones = Vyatta::Zone::get_all_zones("listNodes"); foreach my $zone (@all_zones) { if (!($zone eq $zone_name)) { - my @from_zones = Vyatta::Zone::get_from_zones("listNodes", $zone); + my @from_zones = Vyatta::Zone::get_from_zones("listEffectiveNodes", + $zone); if (scalar(grep(/^$zone_name$/, @from_zones)) > 0) { foreach my $tree (keys %cmd_hash) { # call function to append rules to $zone's chain @@ -299,7 +300,8 @@ to its $zone_chain chain failed [$error]" if $error; } # if this zone has a local from zone, add interface to local zone out chain - my @my_from_zones = Vyatta::Zone::get_from_zones("listNodes", $zone_name); + my @my_from_zones = Vyatta::Zone::get_from_zones("listEffectiveNodes", + $zone_name); foreach my $fromzone (@my_from_zones) { if (defined(Vyatta::Zone::is_local_zone("exists", $fromzone))) { foreach my $tree (keys %cmd_hash) { @@ -339,7 +341,8 @@ $zone_chain with failed [$error]" if $error; my @all_zones = Vyatta::Zone::get_all_zones("listOrigNodes"); foreach my $zone (@all_zones) { if (!($zone eq $zone_name)) { - my @from_zones = Vyatta::Zone::get_from_zones("listOrigPlusComNodes", $zone); + my @from_zones = Vyatta::Zone::get_from_zones("listEffectiveNodes", + $zone); if (scalar(grep(/^$zone_name$/, @from_zones)) > 0) { foreach my $tree (keys %cmd_hash) { # call function to delete rules from $zone's chain @@ -352,7 +355,8 @@ $zone_chain with failed [$error]" if $error; } # if you have local from zone, delete interface to local zone out chain - my @my_from_zones = Vyatta::Zone::get_from_zones("listOrigPlusComNodes", $zone_name); + my @my_from_zones = Vyatta::Zone::get_from_zones("listEffectiveNodes", + $zone_name); foreach my $fromzone (@my_from_zones) { if (defined(Vyatta::Zone::is_local_zone("existsOrig", $fromzone))) { foreach my $tree (keys %cmd_hash) { @@ -396,7 +400,8 @@ $zone_chain chain failed [$error]" if $error; my @all_zones = Vyatta::Zone::get_all_zones("listNodes"); foreach my $zone (@all_zones) { if (!($zone eq $zone_name)) { - my @from_zones = Vyatta::Zone::get_from_zones("listNodes", $zone); + my @from_zones = Vyatta::Zone::get_from_zones("listEffectiveNodes", + $zone); if (scalar(grep(/^$zone_name$/, @from_zones)) > 0) { foreach my $tree (keys %cmd_hash) { my @zone_interfaces = @@ -433,7 +438,8 @@ $zone_chain chain failed [$error]" if $error; my @all_zones = Vyatta::Zone::get_all_zones("listOrigNodes"); foreach my $zone (@all_zones) { if (!($zone eq $zone_name)) { - my @from_zones = Vyatta::Zone::get_from_zones("listOrigPlusComNodes", $zone); + my @from_zones = Vyatta::Zone::get_from_zones("listEffectiveNodes", + $zone); if (scalar(grep(/^$zone_name$/, @from_zones)) > 0) { foreach my $tree (keys %cmd_hash) { my @zone_interfaces = -- cgit v1.2.3