From d9071c5308785021ddc760789313ba62d737995f Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Fri, 10 Mar 2017 10:23:17 -0800 Subject: [PATCH] Correct $LOG_LEVEL expansion Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Config.pm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index 3612a5efb..1de850679 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -5489,6 +5489,14 @@ sub process_shorewall_conf( $$ ) { # Config file update requires that the option values not have # Shell variables expanded. We do that now. # + # We must first make LOG_LEVEL a variable because the order in which + # the values are processed below is not the order in which they appear + # in the config file. + # + my %log_level = ( LOG_LEVEL => $config{LOG_LEVEL} ); + + add_variables( %log_level ); + for ( values %config ) { if ( supplied $_ ) { expand_variables( $_ ) unless /^'(.+)'$/;