mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-15 10:08:43 +01:00
Work around restriction in 2.6.21
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6506 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
15fc0b9153
commit
d9e14ffa1c
@ -58,7 +58,9 @@ sub process_accounting_rule( $$$$$$$$$ ) {
|
||||
"-j $jumpchain";
|
||||
}
|
||||
|
||||
$chain = 'accounting' unless $chain and $chain ne '-';
|
||||
unless ( $chain and $chain ne '-' ) {
|
||||
$chain = $source =~ /^$firewall_zone:?/ ? 'accountout' : 'accounting';
|
||||
}
|
||||
|
||||
my $chainref = ensure_filter_chain $chain , 0;
|
||||
|
||||
@ -138,15 +140,22 @@ sub setup_accounting() {
|
||||
}
|
||||
|
||||
if ( $filter_table->{accounting} ) {
|
||||
for my $chain ( qw/INPUT FORWARD OUTPUT/ ) {
|
||||
for my $chain ( qw/INPUT FORWARD/ ) {
|
||||
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/ ) {
|
||||
for my $chain ( qw/INPUT FORWARD/ ) {
|
||||
insert_rule $filter_table->{$chain}, 1, '-m state --state ESTABLISHED,RELATED -j ACCEPT';
|
||||
}
|
||||
}
|
||||
|
||||
if ( $filter_table->{accountout} ) {
|
||||
insert_rule $filter_table->{OUTPUT}, 1, '-j accountout';
|
||||
insert_rule $filter_table->{OUTPUT}, 2, '-m state --state ESTABLISHED,RELATED -j ACCEPT' if $config{FASTACCEPT};
|
||||
} elsif ( $config{FASTACCEPT} ) {
|
||||
insert_rule $filter_table->{OUTPUT}, 1, '-m state --state ESTABLISHED,RELATED -j ACCEPT';
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
|
Loading…
Reference in New Issue
Block a user