Skip Menu |

This queue is for tickets about the Net-Server CPAN distribution.

Report information
The Basics
Id: 129377
Status: new
Priority: 0/
Queue: Net-Server

People
Owner: Nobody in particular
Requestors: devel [...] sumpfralle.de
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.009
Fixed in: (no value)



Subject: "reverse_lookups" and "allow" fails when listening to IPv6 socket
I am trying to use a configuration similar to this one: reverse_lookups 1 allow ^foo\.lan$ host 172.16.0.1 The above works (i.e. allows connection from "foo.lan"). But if I try to bind the server to IPv6, then connections from "foo.lan" are rejected: reverse_lookups 1 allow ^foo\.lan$ host * In this case the reverse DNS lookup attempted by Net::Server seems to fail. The following lines in Net/Server.pm seem to be the culprit: if ($addr && defined $prop->{'reverse_lookups'}) { if ($INC{'Socket6.pm'} && Socket6->can('getnameinfo')) { my @res = Socket6::getnameinfo($client->peerhost, 0); $prop->{'peerhost'} = $res[0] if @res > 1; The above fails to resolve the hostname "foo.lan" for a connection via IPv4 as well as IPv6. The local name resolution for the IPv4 and IPv6 address of "foo.lan" itself works (tested via "dig -x ..."). My perl is not good enough to discern, what exactly goes wrong in the above code snippet. Maybe someone has an idea? Thank you!