From 199bce925f9b174406c97a25b39130ae300f33da Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Wed, 9 Jan 2013 12:54:29 -0800 Subject: [PATCH] Don't add chains with RETURNs to %terminating. Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Chains.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Shorewall/Perl/Shorewall/Chains.pm b/Shorewall/Perl/Shorewall/Chains.pm index 1f1fa5c08..f16b53fca 100644 --- a/Shorewall/Perl/Shorewall/Chains.pm +++ b/Shorewall/Perl/Shorewall/Chains.pm @@ -2898,7 +2898,7 @@ sub optimize_level4( $$ ) { my $name = $chainref->{name}; my $lastref = $chainref->{rules}[-1]; - unless ( $terminating{$name} ) { + unless ( $chainref->{optflags} & RETURNS || $terminating{$name} ) { $progress = 1 if $terminating{$name} = ( ( $terminating{$lastref->{target} || ''} ) || ( $lastref->{jump} || '' ) eq 'g' ); }