mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-23 22:58:52 +01:00
Correct handling of actions when @chain is altered.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
e013e218a2
commit
9b30f48ba0
@ -1762,10 +1762,11 @@ sub process_action($$) {
|
|||||||
pop_open;
|
pop_open;
|
||||||
|
|
||||||
#
|
#
|
||||||
# Pop the action parameters and delete record of this chain if the action parameters
|
# Pop the action parameters
|
||||||
# were modified
|
# Caller should delete record of this chain if the action parameters
|
||||||
|
# were modified (and this function returns true
|
||||||
#
|
#
|
||||||
delete $usedactions{$wholeaction} if pop_action_params( $oldparms );
|
pop_action_params( $oldparms );
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -2417,6 +2418,8 @@ sub process_rule ( $$$$$$$$$$$$$$$$$$$$ ) {
|
|||||||
#
|
#
|
||||||
# Handle actions
|
# Handle actions
|
||||||
#
|
#
|
||||||
|
my $delete_action;
|
||||||
|
|
||||||
if ( $actiontype & ACTION ) {
|
if ( $actiontype & ACTION ) {
|
||||||
#
|
#
|
||||||
# Create the action:level:tag:param tuple.
|
# Create the action:level:tag:param tuple.
|
||||||
@ -2431,7 +2434,7 @@ sub process_rule ( $$$$$$$$$$$$$$$$$$$$ ) {
|
|||||||
#
|
#
|
||||||
$actionresult = 0;
|
$actionresult = 0;
|
||||||
|
|
||||||
process_action( $ref, $chain );
|
$delete_action = process_action( $ref, $chain );
|
||||||
#
|
#
|
||||||
# Processing the action may determine that the action or one of it's dependents does NAT or HELPER, so:
|
# Processing the action may determine that the action or one of it's dependents does NAT or HELPER, so:
|
||||||
#
|
#
|
||||||
@ -2659,6 +2662,8 @@ sub process_rule ( $$$$$$$$$$$$$$$$$$$$ ) {
|
|||||||
'' );
|
'' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
delete $usedactions{$normalized_target} if $delete_action;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user