summaryrefslogtreecommitdiff
path: root/network_io
diff options
context:
space:
mode:
authortrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2004-05-20 14:53:21 +0000
committertrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2004-05-20 14:53:21 +0000
commit3d48e179af168c6882dd922bbbab40ed8a9a51f6 (patch)
treef0d44abe885212a27303a6520ea87055c10fd5d7 /network_io
parentc5791c76a10c7e181bd3c293225032dfc2cfb59f (diff)
downloadlibapr-3d48e179af168c6882dd922bbbab40ed8a9a51f6.tar.gz
Don't assume getnameinfo() can handle IPv4-mapped IPv6 addresses
on any platforms. Submitted by: Jeff Trawick, Joe Orton, Colm MacC�rthaigh <colm@stdlib.net> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65103 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'network_io')
-rw-r--r--network_io/unix/sockaddr.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/network_io/unix/sockaddr.c b/network_io/unix/sockaddr.c
index 8593725e8..fbaaeae57 100644
--- a/network_io/unix/sockaddr.c
+++ b/network_io/unix/sockaddr.c
@@ -575,11 +575,10 @@ APR_DECLARE(apr_status_t) apr_getnameinfo(char **hostname,
* a numeric address string if it fails to resolve the host name;
* that is *not* what we want here
*
- * Additionally, if we know getnameinfo() doesn't handle IPv4-mapped
- * IPv6 addresses correctly, drop down to IPv4 before calling
- * getnameinfo().
+ * For IPv4-mapped IPv6 addresses, drop down to IPv4 before calling
+ * getnameinfo() to avoid getnameinfo bugs (MacOS X, glibc).
*/
-#ifdef GETNAMEINFO_IPV4_MAPPED_FAILS
+#if APR_HAVE_IPV6
if (sockaddr->family == AF_INET6 &&
IN6_IS_ADDR_V4MAPPED(&sockaddr->sa.sin6.sin6_addr)) {
struct apr_sockaddr_t tmpsa;