From 251884b14d385d0e00122a238efc3ba992e9f39a Mon Sep 17 00:00:00 2001 From: Dirk Koopman Date: Sun, 19 Apr 2020 23:44:00 +0100 Subject: [PATCH] remove any leading ::ffff: on ipv4 addresses --- perl/Msg.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/perl/Msg.pm b/perl/Msg.pm index b355845d..f3642d59 100644 --- a/perl/Msg.pm +++ b/perl/Msg.pm @@ -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}); -- 2.43.0