mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-24 19:51:40 +02:00
Avoid repeated %actions lookup in process_action()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
513b828788
commit
35fac8c2ea
@ -1801,6 +1801,7 @@ sub process_action(\$\$$) {
|
|||||||
my $chainref = ${$chainrefref};
|
my $chainref = ${$chainrefref};
|
||||||
my ( $action, $level, $tag, undef, $param ) = split /:/, $wholeaction, ACTION_TUPLE_ELEMENTS;
|
my ( $action, $level, $tag, undef, $param ) = split /:/, $wholeaction, ACTION_TUPLE_ELEMENTS;
|
||||||
my $type = $targets{$action};
|
my $type = $targets{$action};
|
||||||
|
my $actionref = $actions{$action};
|
||||||
|
|
||||||
if ( $type & BUILTIN ) {
|
if ( $type & BUILTIN ) {
|
||||||
$level = '' if $level =~ /none!?/;
|
$level = '' if $level =~ /none!?/;
|
||||||
@ -1814,7 +1815,7 @@ sub process_action(\$\$$) {
|
|||||||
fatal_error "Action $action may not be used in the mangle file" if $chainref->{table} eq 'mangle';
|
fatal_error "Action $action may not be used in the mangle file" if $chainref->{table} eq 'mangle';
|
||||||
}
|
}
|
||||||
|
|
||||||
my $actionfile = $actions{$action}->{file};
|
my $actionfile = $actionref->{file};
|
||||||
|
|
||||||
fatal_error "Missing Action File ($actionfile)" unless -f $actionfile;
|
fatal_error "Missing Action File ($actionfile)" unless -f $actionfile;
|
||||||
|
|
||||||
@ -1823,7 +1824,7 @@ sub process_action(\$\$$) {
|
|||||||
push_open $actionfile, 2, 1, undef, 2;
|
push_open $actionfile, 2, 1, undef, 2;
|
||||||
|
|
||||||
my $oldparms = push_action_params( $action, $chainref, $param, $level, $tag, $caller );
|
my $oldparms = push_action_params( $action, $chainref, $param, $level, $tag, $caller );
|
||||||
my $options = $actions{$action}{options};
|
my $options = $actionref->{options};
|
||||||
my $nolog = $options & NOINLINE_OPT;
|
my $nolog = $options & NOINLINE_OPT;
|
||||||
|
|
||||||
setup_audit_action( $action ) if $options & AUDIT_OPT;
|
setup_audit_action( $action ) if $options & AUDIT_OPT;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user