forked from extern/shorewall_code
Fix FORWARD chain jumps with sectioning
This commit is contained in:
parent
1438332bbe
commit
a1eefea224
@ -355,19 +355,27 @@ sub setup_accounting() {
|
|||||||
|
|
||||||
if ( $filter_table->{accounting} ) {
|
if ( $filter_table->{accounting} ) {
|
||||||
optimize_okay( 'accounting' ) if $section;
|
optimize_okay( 'accounting' ) if $section;
|
||||||
|
if ( $asection ) {
|
||||||
|
add_jump( $filter_table->{FORWARD}, 'accounting', 0, '', 0, 0 );
|
||||||
|
} else {
|
||||||
for my $chain ( qw/INPUT FORWARD/ ) {
|
for my $chain ( qw/INPUT FORWARD/ ) {
|
||||||
add_jump( $filter_table->{$chain}, 'accounting', 0, '', 0, 0 );
|
add_jump( $filter_table->{$chain}, 'accounting', 0, '', 0, 0 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( $filter_table->{accountout} ) {
|
if ( $filter_table->{accountout} ) {
|
||||||
add_jump( $filter_table->{OUTPUT}, 'accountout', 0, '', 0, 0 );
|
add_jump( $filter_table->{OUTPUT}, 'accountout', 0, '', 0, 0 );
|
||||||
}
|
}
|
||||||
} elsif ( $filter_table->{accounting} ) {
|
} elsif ( $filter_table->{accounting} ) {
|
||||||
|
if ( $asection ) {
|
||||||
|
add_jump( $filter_table->{FORWARD}, 'accounting', 0, '', 0, 0 );
|
||||||
|
} else {
|
||||||
for my $chain ( qw/INPUT FORWARD OUTPUT/ ) {
|
for my $chain ( qw/INPUT FORWARD OUTPUT/ ) {
|
||||||
add_jump( $filter_table->{$chain}, 'accounting', 0, '', 0, 0 );
|
add_jump( $filter_table->{$chain}, 'accounting', 0, '', 0, 0 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( $filter_table->{accipsecin} ) {
|
if ( $filter_table->{accipsecin} ) {
|
||||||
for my $chain ( qw/INPUT FORWARD/ ) {
|
for my $chain ( qw/INPUT FORWARD/ ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user