From cd0837beb5fd22253f1e094b4e41c5675d1810c1 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Thu, 9 Jun 2016 09:00:12 -0700 Subject: [PATCH] Avoid run-time Perl diagnostic when validating a null log level Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Config.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index 50353b7ef..ba57bd133 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -3894,9 +3894,10 @@ my %logoptions = ( tcp_sequence => '--log-tcp-sequence', sub validate_level( $;$ ) { my ( $rawlevel, $option ) = @_; - my $level = uc $rawlevel; + my $level; - if ( supplied ( $level ) ) { + if ( supplied ( $rawlevel ) ) { + $level = uc $rawlevel; $level =~ s/!$//; my $value = $level; my $qualifier;