From: Simon Ruderich Date: Mon, 2 Dec 2013 04:25:41 +0000 (+0100) Subject: Don't use AI_V4MAPPED in getaddrinfo(). X-Git-Url: https://ruderich.org/simon/gitweb/?p=tlsproxy%2Ftlsproxy.git;a=commitdiff_plain;h=e83df110da120749285426797455444da6e6cf95 Don't use AI_V4MAPPED in getaddrinfo(). It shouldn't be necessary anymore and fails on FreeBSD 8/9. --- diff --git a/src/connection.c b/src/connection.c index 0d28749..793e468 100644 --- a/src/connection.c +++ b/src/connection.c @@ -844,7 +844,7 @@ static int connect_to_host(const char *hostname, const char *port) { gai_hints.ai_protocol = 0; gai_hints.ai_flags = AI_NUMERICSERV /* given port is numeric */ | AI_ADDRCONFIG /* supported by this computer */ - | AI_V4MAPPED; /* support IPv4 through IPv6 */ + ; gai_return = getaddrinfo(hostname, port, &gai_hints, &gai_result); if (gai_return != 0) { if (gai_return == EAI_SYSTEM) { diff --git a/tests/client.c b/tests/client.c index fe10c8c..23dca4b 100644 --- a/tests/client.c +++ b/tests/client.c @@ -225,7 +225,7 @@ static int connect_to_host(const char *hostname, const char *port) { gai_hints.ai_protocol = 0; gai_hints.ai_flags = AI_NUMERICSERV /* given port is numeric */ | AI_ADDRCONFIG /* supported by this computer */ - | AI_V4MAPPED; /* support IPv4 through IPv6 */ + ; gai_return = getaddrinfo(hostname, port, &gai_hints, &gai_result); if (gai_return != 0) { if (gai_return == EAI_SYSTEM) {