Eliminate silly extra loop in accounting processing.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2013-12-18 09:19:16 -08:00
parent dd38cdc0f0
commit cd5be38cfb

View File

@ -431,16 +431,14 @@ sub process_accounting_rule( ) {
1 );
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' ) {
section_warning;
process_section( $chain );
} else {
for my $proto ( split_list $protos, 'Protocol' ) {
$nonempty |= process_accounting_rule1( $action, $chain, $source, $dest, $proto, $ports, $sports, $user, $mark, $ipsec, $headers );
}
if ( $action eq 'SECTION' ) {
section_warning;
process_section( $chain );
} else {
for my $proto ( split_list $protos, 'Protocol' ) {
$nonempty |= process_accounting_rule1( $action, $chain, $source, $dest, $proto, $ports, $sports, $user, $mark, $ipsec, $headers );
}
}