diff --git a/Shorewall/Perl/Shorewall/Rules.pm b/Shorewall/Perl/Shorewall/Rules.pm index 1daa6a716..89de8af86 100644 --- a/Shorewall/Perl/Shorewall/Rules.pm +++ b/Shorewall/Perl/Shorewall/Rules.pm @@ -961,13 +961,17 @@ sub finish_chain_section ($$$) { } } - if ( keys %state && ! $config{FASTACCEPT} ) { + if ( keys %state ) { my @state; - for ( qw/ESTABLISHED RELATED/ ) { - push @state, $_ if $state{$_}; + unless ( $config{FASTACCEPT} ) { + for ( qw/ESTABLISHED RELATED/ ) { + push @state, $_ if $state{$_}; + } } + push @state, 'UNTRACKED' if $state{UNTRACKED}; + add_ijump( $chain1ref, j => 'ACCEPT', state_imatch join(',', @state ) ) if @state; }