]> dxcluster.net Git - spider.git/commitdiff
remove any leading ::ffff: on ipv4 addresses newdisc
authorDirk Koopman <djk@tobit.co.uk>
Sun, 19 Apr 2020 22:44:00 +0000 (23:44 +0100)
committerDirk Koopman <djk@tobit.co.uk>
Sun, 19 Apr 2020 22:44:00 +0000 (23:44 +0100)
perl/Msg.pm

index b355845d1196ebccb13fbfa0636f996bc40e7050..f3642d59b79dfabd3bbe0b7f00e7d514421981ba 100644 (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});