diff --git a/Shorewall-perl/Shorewall/Rules.pm b/Shorewall-perl/Shorewall/Rules.pm index aafab8a06..91ef1b1a4 100644 --- a/Shorewall-perl/Shorewall/Rules.pm +++ b/Shorewall-perl/Shorewall/Rules.pm @@ -1174,7 +1174,7 @@ sub process_rule ( $$$$$$$$$$ ) { my $action = isolate_basic_target $target; - $optimize = 0 if $action =~ /!^/; + $optimize = 0 if $action =~ /!$/; if ( $source eq 'all' ) { for my $zone ( @zones ) {