* If we convert an IPv6-mapped-IPv4 address to dotted quad format, and the hostname...
authorArt Cancro <ajc@citadel.org>
Tue, 24 Aug 2010 19:58:56 +0000 (19:58 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 24 Aug 2010 19:58:56 +0000 (19:58 +0000)
citadel/locate_host.c

index 6ddc48a50d6106297556af49319b78e194a6cdd5..e3840570e5dbfa1a0b9483bba929465e32922531 100644 (file)
@@ -60,6 +60,7 @@ void locate_host(char *tbuf, size_t n, char *abuf, size_t na, int client_socket)
         * as dotted-quad, even if they come in over a hybrid IPv6/IPv4 socket.
         */
        if ( (strlen(abuf) > 7) && (!strncasecmp(abuf, "::ffff:", 7)) ) {
+               if (!strcmp(abuf, tbuf)) strcpy(tbuf, &tbuf[7]);
                strcpy(abuf, &abuf[7]);
        }
 }