diff --git a/Shorewall-perl/Shorewall/Chains.pm b/Shorewall-perl/Shorewall/Chains.pm index ce01d232f..00dbcb793 100644 --- a/Shorewall-perl/Shorewall/Chains.pm +++ b/Shorewall-perl/Shorewall/Chains.pm @@ -1432,8 +1432,7 @@ sub match_source_net( $;$ ) { } elsif ( $net =~ /^(!?)\+/ ) { require_capability( 'IPSET_MATCH' , 'ipset names in Shorewall configuration files' , '' ); join( '', '-m set ', $1 ? '! ' : '', get_set_flags( $net, 'src' ) ); - } elsif ( $net =~ /^!/ ) { - $net =~ s/!//; + } elsif ( $net =~ s/^!// ) { validate_net $net, 1; "-s ! $net "; } else {