From 5dbe2aa9ec182a25fffd9cc59dc4e71e46b2df97 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Mon, 7 Jan 2013 07:00:15 -0800 Subject: [PATCH] Optimize a test in finish_chain_section(). Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Rules.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Rules.pm b/Shorewall/Perl/Shorewall/Rules.pm index 26a9b5607..a09a7474c 100644 --- a/Shorewall/Perl/Shorewall/Rules.pm +++ b/Shorewall/Perl/Shorewall/Rules.pm @@ -878,10 +878,10 @@ sub finish_chain_section ($$$) { if ( $state && ! $config{FASTACCEPT} ) { - if ( $chainref->{name} eq $chain1ref->{name} ) { - add_ijump $chainref, j => 'ACCEPT', state_imatch $state; - } else { + if ( $relatedchain ) { add_ijump $chainref, j => 'ACCEPT'; + } else { + add_ijump $chainref, j => 'ACCEPT', state_imatch $state; } }