forked from extern/shorewall_code
Fix more exclusion problems in hosts file
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6255 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
666ecf49b6
commit
ef44b4741a
@ -114,7 +114,11 @@ sub validate_hosts_file()
|
||||
#
|
||||
# Now add a comma before '!'. Do it globally - add_group_to_zone() correctly checks for multiple exclusions
|
||||
#
|
||||
$hosts =~ s/!/,!/g;
|
||||
if ( substr($hosts, 0, 1 ) eq '!' ) {
|
||||
$hosts = join( '', ALLIPv4 , ',', $hosts );
|
||||
} else {
|
||||
$hosts =~ s/!/,!/g
|
||||
}
|
||||
|
||||
add_group_to_zone( $zone, $type , $interface, [ split( ',', $hosts ) ] , $optionsref);
|
||||
|
||||
|
@ -81,7 +81,6 @@ 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;
|
||||
|
@ -1608,7 +1608,7 @@ sub generate_matrix() {
|
||||
} elsif ( $chain =~ /2all$/ ) {
|
||||
my $chain1 = $policy_exclusions{"${chain}_${zone1}"};
|
||||
|
||||
unless ( $chain ) {
|
||||
unless ( $chain1 ) {
|
||||
$chain1 = newexclusionchain;
|
||||
$policy_exclusions{"${chain}_${zone1}"} = $chain1;
|
||||
my $chain1ref = ensure_filter_chain $chain1, 0;
|
||||
|
Loading…
Reference in New Issue
Block a user