diff --git a/Shorewall-perl/Shorewall/Chains.pm b/Shorewall-perl/Shorewall/Chains.pm index 00dbcb793..ae340dc3d 100644 --- a/Shorewall-perl/Shorewall/Chains.pm +++ b/Shorewall-perl/Shorewall/Chains.pm @@ -1474,8 +1474,7 @@ sub match_orig_dest ( $ ) { return '' if $net eq ALLIPv4; return '' unless $capabilities{CONNTRACK_MATCH}; - if ( $net =~ /^!/ ) { - $net =~ s/!//; + if ( $net =~ s/^!// ) { validate_net $net, 1; "-m conntrack --ctorigdst ! $net "; } else {