mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-16 03:10:39 +01:00
Fix "!" in hosts file
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6254 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
a9ba8c8ad4
commit
666ecf49b6
@ -116,7 +116,7 @@ sub validate_hosts_file()
|
||||
#
|
||||
$hosts =~ s/!/,!/g;
|
||||
|
||||
add_group_to_zone( $zone, $type , $interface, [ split ',', $hosts ] , $optionsref);
|
||||
add_group_to_zone( $zone, $type , $interface, [ split( ',', $hosts ) ] , $optionsref);
|
||||
|
||||
progress_message " Host \"$line\" validated";
|
||||
}
|
||||
|
@ -81,6 +81,7 @@ sub add_group_to_zone($$$$$)
|
||||
$ifacezone = '' unless defined $ifacezone;
|
||||
|
||||
for my $host ( @$networks ) {
|
||||
next unless $host;
|
||||
if ( substr( $host, 0, 1 ) eq '!' ) {
|
||||
fatal_error "Only one exclusion allowed in a host list" if $switched;
|
||||
$switched = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user