Add new zone-list function to return all but firewall zone.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2010-07-03 08:33:10 -07:00
parent c8274f0538
commit 21ce6f9b84
2 changed files with 8 additions and 3 deletions

View File

@ -1589,7 +1589,7 @@ sub process_rule ( ) {
if ( $anydest ) {
@dest = ( all_parent_zones );
} else {
@dest = ( non_firewall_zones, vserver_zones )
@dest = ( non_firewall_zones )
}
unshift @dest, firewall_zone if $includedstfw;
@ -1841,7 +1841,7 @@ sub generate_matrix() {
my $preroutingref = ensure_chain 'nat', 'dnat';
my $fw = firewall_zone;
my $notrackref = $raw_table->{notrack_chain $fw};
my @zones = non_firewall_zones;
my @zones = off_firewall_zones;
my @vservers = vserver_zones;
my $interface_jumps_added = 0;
our %input_jump_added = ();

View File

@ -54,6 +54,7 @@ our @EXPORT = qw( NOTHING
all_parent_zones
complex_zones
vserver_zones
off_firewall_zones
non_firewall_zones
single_interface
chain_base
@ -730,10 +731,14 @@ sub all_zones() {
@zones;
}
sub non_firewall_zones() {
sub off_firewall_zones() {
grep ( ! ( $zones{$_}{type} == FIREWALL || $zones{$_}{type} == VSERVER ) , @zones );
}
sub non_firewall_zones() {
grep ( $zones{$_}{type} != FIREWALL , @zones );
}
sub all_parent_zones() {
grep ( ! @{$zones{$_}{parents}} , @zones );
}