Clean up use_policy_action()

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2016-01-17 12:35:12 -08:00
parent 1ee645cd79
commit 4059e9de95

View File

@ -1935,19 +1935,17 @@ sub use_policy_action( $$ ) {
my $ref = use_action( $normalized_target );
if ( $ref ) {
my $result = process_action( $ref, $caller );
if ( my $result = process_action( $ref, $caller ) ) {
if ( $result & PARMSMODIFIED ) {
delete $usedactions{$ref->{action}};
} elsif ( $result & USEDCALLER ) {
} else {
#
# The chain uses @CALLER but doesn't modify the action parameters.
# We need to see if this chain has already called this action
#
my $renormalized_target = insert_caller( $normalized_target, $caller );
my $ref1 = $usedactions{$renormalized_target};
if ( $ref1 ) {
if ( my $ref1 = $usedactions{$renormalized_target} ) {
#
# It has -- use the prior chain
#
@ -1970,6 +1968,7 @@ sub use_policy_action( $$ ) {
#
delete $usedactions{$normalized_target};
}
}
} else {
$ref = $usedactions{$normalized_target};
}