From 359de906cab5a2f6b645ad5e1d512571235d3eed Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Fri, 6 May 2011 07:29:00 -0700 Subject: [PATCH] Refinement to fix for double exclusion Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Chains.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Chains.pm b/Shorewall/Perl/Shorewall/Chains.pm index 1c3673a11..b8b28ef79 100644 --- a/Shorewall/Perl/Shorewall/Chains.pm +++ b/Shorewall/Perl/Shorewall/Chains.pm @@ -3248,12 +3248,12 @@ sub mysplit( $;$ ) { unless ( $loose ) { fatal_error "Invalid host list ($input)" if $exclude && $element =~ /!/; + $exclude ||= $element =~ /^!/ || $element =~ /\]!/; } - $exclude ||= $element =~ /^!/ || $element =~ /\]!/; fatal_error "Mismatched [...] ($element)" unless $element =~ tr/[/[/ == $element =~ tr/]/]/; } else { - $exclude ||= $element =~ /!/; + $exclude ||= $element =~ /!/ unless $loose; } push @result, $element;