mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-27 13:11:57 +02:00
Eliminate silly extra loop in accounting processing.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
dd38cdc0f0
commit
cd5be38cfb
@ -431,16 +431,14 @@ sub process_accounting_rule( ) {
|
|||||||
1 );
|
1 );
|
||||||
my $nonempty = 0;
|
my $nonempty = 0;
|
||||||
|
|
||||||
for my $proto ( split_list $protos, 'Protocol' ) {
|
fatal_error 'ACTION must be specified' if $action eq '-';
|
||||||
fatal_error 'ACTION must be specified' if $action eq '-';
|
|
||||||
|
|
||||||
if ( $action eq 'SECTION' ) {
|
if ( $action eq 'SECTION' ) {
|
||||||
section_warning;
|
section_warning;
|
||||||
process_section( $chain );
|
process_section( $chain );
|
||||||
} else {
|
} else {
|
||||||
for my $proto ( split_list $protos, 'Protocol' ) {
|
for my $proto ( split_list $protos, 'Protocol' ) {
|
||||||
$nonempty |= process_accounting_rule1( $action, $chain, $source, $dest, $proto, $ports, $sports, $user, $mark, $ipsec, $headers );
|
$nonempty |= process_accounting_rule1( $action, $chain, $source, $dest, $proto, $ports, $sports, $user, $mark, $ipsec, $headers );
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user