fixed a message of 'use of uninitialized value' in 'port.pm'. #110

This commit is contained in:
Jordi Sanfeliu 2015-09-22 15:59:19 +02:00
parent 5fcd06a55b
commit 49269364ba
1 changed files with 3 additions and 3 deletions

View File

@ -147,7 +147,7 @@ sub port_init {
} }
$cmd = "iptables" . $config->{iptables_wait_lock}; $cmd = "iptables" . $config->{iptables_wait_lock};
if(grep {$_ eq $p} ("tcp6", "udp6")) { 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."); logger("$myself: IPv6 is explicitly disabled, you shouldn't want to monitor 'tcp6' or 'udp6' protocols.");
next; next;
} }
@ -219,7 +219,7 @@ sub port_update {
open(IN, "$cmd -t $table -nxvL INPUT 2>/dev/null |"); open(IN, "$cmd -t $table -nxvL INPUT 2>/dev/null |");
@data = <IN>; @data = <IN>;
close(IN); 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 |"); open(IN, "$cmd6 -t $table -nxvL INPUT 2>/dev/null |");
push(@data, <IN>); push(@data, <IN>);
close(IN); close(IN);
@ -249,7 +249,7 @@ sub port_update {
open(IN, "$cmd -t $table -nxvL OUTPUT 2>/dev/null |"); open(IN, "$cmd -t $table -nxvL OUTPUT 2>/dev/null |");
@data = <IN>; @data = <IN>;
close(IN); 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 |"); open(IN, "$cmd6 -t $table -nxvL OUTPUT 2>/dev/null |");
push(@data, <IN>); push(@data, <IN>);
close(IN); close(IN);