mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-15 12:14:32 +01:00
Minor tweak to Shorewall::Zones
Signed-off-by: Tom Eastep <teastep@shorewall.net> git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@9724 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
bb8e562d18
commit
1ff093b1c0
@ -201,7 +201,7 @@ sub parse_zone_option_list($$)
|
|||||||
#
|
#
|
||||||
# Hash of options that have their own key in the returned hash.
|
# Hash of options that have their own key in the returned hash.
|
||||||
#
|
#
|
||||||
my %key = ( mss => "mss" );
|
my %key = ( mss => 'mss' );
|
||||||
|
|
||||||
my ( $list, $zonetype ) = @_;
|
my ( $list, $zonetype ) = @_;
|
||||||
my %h;
|
my %h;
|
||||||
@ -284,8 +284,6 @@ sub determine_zones()
|
|||||||
fatal_error "Invalid zone name ($zone)" if $reservedName{$zone} || $zone =~ /^all2|2all$/;
|
fatal_error "Invalid zone name ($zone)" if $reservedName{$zone} || $zone =~ /^all2|2all$/;
|
||||||
fatal_error( "Duplicate zone name ($zone)" ) if $zones{$zone};
|
fatal_error( "Duplicate zone name ($zone)" ) if $zones{$zone};
|
||||||
|
|
||||||
$type = IP unless $type;
|
|
||||||
|
|
||||||
if ( $type =~ /ipv4/i ) {
|
if ( $type =~ /ipv4/i ) {
|
||||||
fatal_error "Invalid zone type ($type)" if $family == F_IPV6;
|
fatal_error "Invalid zone type ($type)" if $family == F_IPV6;
|
||||||
$type = IP;
|
$type = IP;
|
||||||
@ -332,6 +330,7 @@ sub determine_zones()
|
|||||||
hosts => {}
|
hosts => {}
|
||||||
};
|
};
|
||||||
push @z, $zone;
|
push @z, $zone;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fatal_error "No firewall zone defined" unless $firewall_zone;
|
fatal_error "No firewall zone defined" unless $firewall_zone;
|
||||||
@ -588,7 +587,7 @@ sub all_zones() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub non_firewall_zones() {
|
sub non_firewall_zones() {
|
||||||
grep ( $zones{$_}{type} != FIREWALL , @zones );
|
grep ( $zones{$_}{type} != FIREWALL , @zones );
|
||||||
}
|
}
|
||||||
|
|
||||||
sub complex_zones() {
|
sub complex_zones() {
|
||||||
|
Loading…
Reference in New Issue
Block a user