mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-28 17:18:49 +01:00
Fix FASTACCEPT=Yes -- Take 3
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5876 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
f900585e88
commit
fbf73e1c34
@ -109,7 +109,7 @@ sub process_accounting_rule( $$$$$$$$ ) {
|
||||
}
|
||||
|
||||
sub setup_accounting() {
|
||||
|
||||
|
||||
my $first_entry = 1;
|
||||
|
||||
my $fn = open_file 'accounting';
|
||||
@ -127,8 +127,13 @@ sub setup_accounting() {
|
||||
}
|
||||
|
||||
if ( $filter_table->{accounting} ) {
|
||||
for my $chain qw/INPUT FORWARD OUTPUT/ {
|
||||
for my $chain ( qw/INPUT FORWARD OUTPUT/ ) {
|
||||
insert_rule $filter_table->{$chain}, 1, '-j accounting';
|
||||
insert_rule $filter_table->{$chain}, 2, '-m state --state ESTABLISHED,RELATED -j ACCEPT' if $config{FASTACCEPT};
|
||||
}
|
||||
} elsif ( $config{FASTACCEPT} ) {
|
||||
for my $chain ( qw/INPUT FORWARD OUTPUT/ ) {
|
||||
insert_rule $filter_table->{$chain}, 1, '-m state --state ESTABLISHED,RELATED -j ACCEPT';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1647,12 +1647,6 @@ sub generate_matrix() {
|
||||
nat=> [ qw/PREROUTING OUTPUT POSTROUTING/ ] ,
|
||||
filter=> [ qw/INPUT FORWARD OUTPUT/ ] );
|
||||
|
||||
if ( $config{FASTACCEPT} ) {
|
||||
for my $chain ( @{$builtins{filter}} ) {
|
||||
add_rule $filter_table->{$chain}, "-m state --state ESTABLISHED,RELATED -j ACCEPT";
|
||||
}
|
||||
}
|
||||
|
||||
complete_standard_chain $filter_table->{INPUT} , 'all' , $firewall_zone;
|
||||
complete_standard_chain $filter_table->{OUTPUT} , $firewall_zone , 'all';
|
||||
complete_standard_chain $filter_table->{FORWARD} , 'all' , 'all';
|
||||
|
Loading…
Reference in New Issue
Block a user