remove any leading ::ffff: on ipv4 addresses

This commit is contained in:
Dirk Koopman 2020-04-19 23:44:00 +01:00
parent fc8f1ff871
commit 251884b14d

View File

@ -498,6 +498,7 @@ sub new_client {
$sock->timeout(0);
$sock->start;
$conn->{peerhost} = $handle->peerhost;
$conn->{peerhost} =~ s|^::ffff:||; # chop off leading pseudo IPV6 stuff on dual stack listeners
$conn->{peerport} = $handle->peerport;
dbg((ref $conn) . " accept $conn->{cnum} from $conn->{peerhost}:$conn->{peerport}") if isdbg('connll');
my ($rproc, $eproc) = &{$server_conn->{rproc}} ($conn, $conn->{peerhost}, $conn->{peerport});