2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 16:56:54 +00:00

TcpServerUtils.pm: adjust the "local-IP" regexp for IPV6 (Forum #73686)

git-svn-id: https://svn.fhem.de/fhem/trunk@14588 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2017-06-28 13:21:57 +00:00
parent ef7a69bef5
commit de5e87d9fe

View File

@ -73,8 +73,8 @@ TcpServer_Accept($$)
my $af = $attr{$name}{allowfrom};
if(!$af) {
my $re = "^(127|192.168|172.(1[6-9]|2[0-9]|3[01])|10|169.254)\\.|".
"^(fe[89ab]|::1)";
my $re ="^(::ffff:)?(127|192.168|172.(1[6-9]|2[0-9]|3[01])|10|169.254)\\.|".
"^(f[cde]|::1)";
if($caddr !~ m/$re/) {
my %empty;
$hash->{SNAME} = $hash->{NAME};