From b9d5b92f1b5dd67af747381874bd33a22d94b212 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sun, 10 Feb 2013 15:19:30 -0800 Subject: [PATCH] Correct handling of expressions consisting of a single number. Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Config.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index e4d48eff2..71780c9de 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -2212,7 +2212,9 @@ sub evaluate_expression( $$$ ) { print "EXPR=> $expression\n" if $debug; - unless ( $expression =~ /^\d+$/ ) { + if ( $expression =~ /^\d+$/ ) { + $val = $expression + } else { # # Not a simple one-term expression -- compile it #