From 11d4e92a2996004019b75f813fff056bb213b897 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Thu, 29 Nov 2012 14:39:02 -0800 Subject: [PATCH] Correct check for leading zeros in action variables. Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Config.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index d34d98bf3..a31351b6a 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -2483,7 +2483,7 @@ sub expand_variables( \$ ) { my $val; if ( $var =~ /^\d+$/ ) { - fatal_error "Undefined parameter (\$$var)" if ( ! defined $actparms[$var] ) || ( length( $var ) > 0 && $var =~ /^0/ ); + fatal_error "Undefined parameter (\$$var)" if ( ! defined $actparms[$var] ) || ( length( $var ) > 1 && $var =~ /^0/ ); $val = $var ? $actparms[$var] : $actparms[0]->{name}; } elsif ( exists $params{$var} ) { $val = $params{$var};