From 49269364bacb26df74870486e586ceb8b3cdd201 Mon Sep 17 00:00:00 2001 From: Jordi Sanfeliu Date: Tue, 22 Sep 2015 15:59:19 +0200 Subject: [PATCH] fixed a message of 'use of uninitialized value' in 'port.pm'. #110 --- lib/port.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/port.pm b/lib/port.pm index e992812..b2209ab 100644 --- a/lib/port.pm +++ b/lib/port.pm @@ -147,7 +147,7 @@ sub port_init { } $cmd = "iptables" . $config->{iptables_wait_lock}; if(grep {$_ eq $p} ("tcp6", "udp6")) { - if(lc($config->{ipv6_disabled}) eq "y") { + if(lc($config->{ipv6_disabled} || "") eq "y") { logger("$myself: IPv6 is explicitly disabled, you shouldn't want to monitor 'tcp6' or 'udp6' protocols."); next; } @@ -219,7 +219,7 @@ sub port_update { open(IN, "$cmd -t $table -nxvL INPUT 2>/dev/null |"); @data = ; close(IN); - if(lc($config->{ipv6_disabled}) ne "y") { + if(lc($config->{ipv6_disabled} || "") ne "y") { open(IN, "$cmd6 -t $table -nxvL INPUT 2>/dev/null |"); push(@data, ); close(IN); @@ -249,7 +249,7 @@ sub port_update { open(IN, "$cmd -t $table -nxvL OUTPUT 2>/dev/null |"); @data = ; close(IN); - if(lc($config->{ipv6_disabled}) ne "y") { + if(lc($config->{ipv6_disabled} || "") ne "y") { open(IN, "$cmd6 -t $table -nxvL OUTPUT 2>/dev/null |"); push(@data, ); close(IN);