summaryrefslogtreecommitdiff
path: root/network_io
diff options
context:
space:
mode:
authorEric Covener <covener@apache.org>2014-10-27 17:46:28 +0000
committerEric Covener <covener@apache.org>2014-10-27 17:46:28 +0000
commit21dde2ad87cdcd231b2c1354c5750fc71db33283 (patch)
treee19915ba99e5129231434ec5f1df2f9ed8429a76 /network_io
parent2fd90ca245f5886db71db6f57380d7588d9bf61e (diff)
downloadapr-21dde2ad87cdcd231b2c1354c5750fc71db33283.tar.gz
*) On z/OS, apr_sockaddr_info_get() with family == APR_UNSPEC was not
returning IPv4 addresses if any IPv6 addresses were returned. [Eric Covener] git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1634615 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'network_io')
-rw-r--r--network_io/unix/sockaddr.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/network_io/unix/sockaddr.c b/network_io/unix/sockaddr.c
index d51556e25..741707369 100644
--- a/network_io/unix/sockaddr.c
+++ b/network_io/unix/sockaddr.c
@@ -333,6 +333,16 @@ static apr_status_t call_resolver(apr_sockaddr_t **sa,
hints.ai_flags = AI_ADDRCONFIG;
}
#endif
+
+#ifdef __MVS__
+ /* z/OS will not return IPv4 address under AF_UNSPEC if any IPv6 results
+ * are returned, w/o AI_ALL.
+ */
+ if (family == APR_UNSPEC) {
+ hints.ai_flags |= AI_ALL;
+ }
+#endif
+
if(hostname == NULL) {
#ifdef AI_PASSIVE
/* If hostname is NULL, assume we are trying to bind to all