TcpServerUtils.pm: use ::1 for non-global IPV6 (Forum #62203)

git-svn-id: https://svn.fhem.de/fhem/trunk@13967 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2017-04-11 09:32:30 +00:00
parent 62767a9afe
commit fa36aa285a

View File

@ -24,9 +24,11 @@ TcpServer_Open($$$)
}
}
my $lh = ($global ? ($global eq "global"? undef : $global) :
($hash->{IPV6} ? "::1" : "127.0.0.1"));
my @opts = (
Domain => ($hash->{IPV6} ? AF_INET6() : AF_UNSPEC), # Linux bug
LocalHost => ($global ? ($global eq "global"? undef:$global) : "127.0.0.1"),
LocalHost => $lh,
LocalPort => $port,
Listen => 10,
Blocking => ($^O =~ /Win/ ? 1 : 0), # Needed for .WRITEBUFFER@darwin