forked from extern/shorewall_code
Fix duplicate log rate and add tests for illegal ESTABLISHED,RELATED rules
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6283 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
6d6edff079
commit
18a7ce4f1d
@ -1154,9 +1154,10 @@ sub log_rule_limit( $$$$$$$$ ) {
|
||||
|
||||
my $prefix;
|
||||
|
||||
unless ( $predicates =~ /-m limit / ) {
|
||||
$limit = $globals{LOGLIMIT} unless $limit && $limit ne '-';
|
||||
|
||||
$predicates .= $limit;
|
||||
}
|
||||
|
||||
if ( $tag ) {
|
||||
if ( $config{LOGTAGONLY} ) {
|
||||
|
@ -977,7 +977,12 @@ sub process_rule1 ( $$$$$$$$$$ ) {
|
||||
#
|
||||
$rule = join( '', do_proto($proto, $ports, $sports), do_ratelimit( $ratelimit, $basictarget ) , do_user( $user ) , do_test( $mark , 0xFF ) );
|
||||
|
||||
$rule .= "-m state --state $section " if $section eq 'ESTABLISHED' || $section eq 'RELATED';
|
||||
if ( $section eq 'ESTABLISHED' || $section eq 'RELATED' ) {
|
||||
fatal_error "Entries in the $section SECTION of the rules file not permitted with FASTACCEPT=Yes" if $config{FASTACCEPT};
|
||||
fatal_error "$basictarget rules are not allowed in the $section SECTION" if $actiontype & NONAT;
|
||||
$rule .= "-m state --state $section "
|
||||
}
|
||||
|
||||
#
|
||||
# Generate NAT rule(s), if any
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user