From 73fd003e7a0fd571e343a33728cc0f63e090dbc8 Mon Sep 17 00:00:00 2001 From: Jordi Sanfeliu Date: Tue, 1 Sep 2015 16:32:47 +0200 Subject: [PATCH] fix the message of 'use of uninitialized value' on missing 'ipv6_disabled' option. #105 --- lib/Monitorix.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Monitorix.pm b/lib/Monitorix.pm index aa57c2f..d27e890 100644 --- a/lib/Monitorix.pm +++ b/lib/Monitorix.pm @@ -358,7 +358,7 @@ sub flush_accounting_rules { } # IPv6 - if(lc($config->{ipv6_disabled}) ne "y") { + if(lc($config->{ipv6_disabled} || "") ne "y") { undef(@names); if(open(IN, "$cmd6 -t $table -nxvL INPUT --line-numbers |")) { my @rules; @@ -417,7 +417,7 @@ sub flush_accounting_rules { system("$cmd -t $table -X $_"); } } - if(lc($config->{ipv6_disabled}) ne "y") { + if(lc($config->{ipv6_disabled} || "") ne "y") { if(open(IN, "$cmd6 -t $table -nxvL FORWARD --line-numbers |")) { my @rules; my @names; @@ -441,7 +441,7 @@ sub flush_accounting_rules { } } logger("$num iptables rules have been flushed.") if $debug; - if(lc($config->{ipv6_disabled}) ne "y") { + if(lc($config->{ipv6_disabled} || "") ne "y") { logger("$num6 ip6tables rules have been flushed.") if $debug; } }