Refinement to fix for double exclusion

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2011-05-06 07:29:00 -07:00
parent d02269e53c
commit 277493058d

View File

@ -3251,12 +3251,12 @@ sub mysplit( $$ ) {
unless ( $loose ) { unless ( $loose ) {
fatal_error "Invalid host list ($input)" if $exclude && $element =~ /!/; fatal_error "Invalid host list ($input)" if $exclude && $element =~ /!/;
$exclude ||= $element =~ /^!/ || $element =~ /\]!/;
} }
$exclude ||= $element =~ /^!/ || $element =~ /\]!/;
fatal_error "Mismatched [...] ($element)" unless $element =~ tr/[/[/ == $element =~ tr/]/]/; fatal_error "Mismatched [...] ($element)" unless $element =~ tr/[/[/ == $element =~ tr/]/]/;
} else { } else {
$exclude ||= $element =~ /!/; $exclude ||= $element =~ /!/ unless $loose;
} }
push @result, $element; push @result, $element;