mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-16 03:10:39 +01:00
Check for reserved zone names
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6035 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
5c241dbc65
commit
8f406123b5
@ -106,6 +106,9 @@ our $firewall_zone;
|
||||
#
|
||||
our %interfaces;
|
||||
|
||||
my %reservedName = ( all => 1,
|
||||
none => 1 );
|
||||
|
||||
#
|
||||
# Parse the passed option list and return a reference to a hash as follows:
|
||||
#
|
||||
@ -209,7 +212,7 @@ sub determine_zones()
|
||||
}
|
||||
|
||||
fatal_error "Invalid zone name: $zone" unless "\L$zone" =~ /^[a-z]\w*$/ && length $zone <= $globals{MAXZONENAMELENGTH};
|
||||
fatal_error "Invalid zone name: $zone" if $zone =~ /^all2|2all$/;
|
||||
fatal_error "Invalid zone name: $zone" if $reservedName{$zone} || $zone =~ /^all2|2all$/;
|
||||
fatal_error( "Duplicate zone name: $zone\n" ) if $zones{$zone};
|
||||
|
||||
my $zoneref = $zones{$zone} = {};
|
||||
|
Loading…
Reference in New Issue
Block a user