From 6a1487d628d601645e58d27f8e0a64d8ec180e42 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Mon, 27 Dec 2010 12:31:34 -0800 Subject: [PATCH] Correct existing optimization issue --- Shorewall/Perl/Shorewall/Chains.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Chains.pm b/Shorewall/Perl/Shorewall/Chains.pm index 28d2ece30..978a3d591 100644 --- a/Shorewall/Perl/Shorewall/Chains.pm +++ b/Shorewall/Perl/Shorewall/Chains.pm @@ -2040,8 +2040,7 @@ sub logchain( $$$$$$ ) { $logtag, 'add', '' ); - - add_rule( $logchainref, $exceptionrule . $target ); + add_jump( $logchainref, $target, 0, $exceptionrule ); } $logchainref; @@ -3849,9 +3848,11 @@ sub expand_rule( $$$$$$$$$$;$ ) # # Find/Create a chain that both logs and applies the target action # and jump to the log chain if all of the rule's conditions are met - # + # + assert( $target ); + add_jump( $chainref, - logchain( $chainref, $loglevel, $logtag, $exceptionrule , $disposition, $jump ), + logchain( $chainref, $loglevel, $logtag, $exceptionrule , $disposition, $target ), $builtin_target{$disposition}, $matches, 1 );