Make logging work correctly in ESTABLISHED and RELATED sections

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@8406 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2008-04-09 21:09:43 +00:00
parent e3ec13c042
commit ed538add0e

View File

@ -2059,6 +2059,7 @@ sub expand_rule( $$$$$$$$$$ )
#
for my $dnet ( mysplit $dnets ) {
if ( $loglevel ne '' ) {
my $state = $section eq 'NEW' ? '' : "-m state --state $section ";
log_rule_limit
$loglevel ,
$chainref ,
@ -2067,7 +2068,7 @@ sub expand_rule( $$$$$$$$$$ )
'' ,
$logtag ,
'add' ,
join( '', $rule, match_source_net( $inet , $restriction ) , match_dest_net( $dnet ), $onet );
join( '', $state, $rule, match_source_net( $inet , $restriction ) , match_dest_net( $dnet ), $onet );
}
unless ( $disposition eq 'LOG' ) {