mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-09 07:08:14 +01:00
Create unique chains when @caller is used
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
de21c59885
commit
21765d618d
@ -3305,6 +3305,7 @@ sub expand_variables( \$ ) {
|
|||||||
$val = $variables{$var};
|
$val = $variables{$var};
|
||||||
} elsif ( exists $actparms{$var} ) {
|
} elsif ( exists $actparms{$var} ) {
|
||||||
$val = $actparms{$var};
|
$val = $actparms{$var};
|
||||||
|
$parmsmodified = 1 if $var eq 'caller';
|
||||||
} else {
|
} else {
|
||||||
fatal_error "Undefined shell variable (\$$var)" unless $config{IGNOREUNKNOWNVARIABLES} || exists $config{$var};
|
fatal_error "Undefined shell variable (\$$var)" unless $config{IGNOREUNKNOWNVARIABLES} || exists $config{$var};
|
||||||
}
|
}
|
||||||
@ -3323,6 +3324,7 @@ sub expand_variables( \$ ) {
|
|||||||
while ( $$lineref =~ m( ^(.*?) \@({)? (\d+|[a-zA-Z_]\w*) (?(2)}) (.*)$ )x ) {
|
while ( $$lineref =~ m( ^(.*?) \@({)? (\d+|[a-zA-Z_]\w*) (?(2)}) (.*)$ )x ) {
|
||||||
my ( $first, $var, $rest ) = ( $1, $3, $4);
|
my ( $first, $var, $rest ) = ( $1, $3, $4);
|
||||||
my $val = $var ? $actparms{$var} : $actparms{chain};
|
my $val = $var ? $actparms{$var} : $actparms{chain};
|
||||||
|
$parmsmodified = 1 if $var eq 'caller';
|
||||||
$val = '' unless defined $val;
|
$val = '' unless defined $val;
|
||||||
$$lineref = join( '', $first , $val , $rest );
|
$$lineref = join( '', $first , $val , $rest );
|
||||||
fatal_error "Variable Expansion Loop" if ++$count > 100;
|
fatal_error "Variable Expansion Loop" if ++$count > 100;
|
||||||
|
Loading…
Reference in New Issue
Block a user