mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-27 01:53:27 +01:00
Save/Restore $current_param in process_inline()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
df5f34951c
commit
c36cee28fb
@ -2930,8 +2930,6 @@ sub process_rule ( $$$$$$$$$$$$$$$$$$$$ ) {
|
||||
# process_inline() will call process_rule() recursively for each rule in the macro body
|
||||
#
|
||||
fatal_error "Macro/Inline invocations nested too deeply" if ++$macro_nest_level > MAX_MACRO_NEST_LEVEL;
|
||||
|
||||
$current_param = $param unless $param eq '' || $param eq 'PARAM';
|
||||
#
|
||||
# Push the current column array onto the column stack
|
||||
#
|
||||
@ -2943,6 +2941,10 @@ sub process_rule ( $$$$$$$$$$$$$$$$$$$$ ) {
|
||||
|
||||
$actionresult = 0;
|
||||
|
||||
my $save_current_param = $current_param;
|
||||
|
||||
$current_param = $param;
|
||||
|
||||
my $generated = process_inline( $basictarget,
|
||||
$chainref,
|
||||
$rule . $raw_matches,
|
||||
@ -2968,6 +2970,8 @@ sub process_rule ( $$$$$$$$$$$$$$$$$$$$ ) {
|
||||
|
||||
( $actionresult, @columns ) = @{pop @columnstack};
|
||||
|
||||
$current_param = $save_current_param;
|
||||
|
||||
$macro_nest_level--;
|
||||
|
||||
return $generated;
|
||||
|
Loading…
Reference in New Issue
Block a user