Simplify logic for generating all parent zones

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2010-08-12 15:15:19 -07:00
parent 7168257152
commit 15eec24672

View File

@ -741,12 +741,10 @@ sub non_firewall_zones() {
sub all_parent_zones() { sub all_parent_zones() {
# #
# Although the firewall zone is a parent zone, we let the caller decide # Although the firewall zone is technically a parent zone, we let the caller decide
# if it is to be included or not. # if it is to be included or not.
# #
grep ( ! ( $zones{$_}->{type} == FIREWALL || grep ( ! @{$zones{$_}{parents}} , off_firewall_zones );
$zones{$_}->{type} == VSERVER ||
@{$zones{$_}{parents}} ) , @zones );
} }
sub complex_zones() { sub complex_zones() {