You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by co...@apache.org on 2014/10/27 18:51:39 UTC
svn commit: r1634619 - in /apr/apr/branches/1.5.x: ./ CHANGES
network_io/unix/sockaddr.c
Author: covener
Date: Mon Oct 27 17:51:38 2014
New Revision: 1634619
URL: http://svn.apache.org/r1634619
Log:
Merge r1634615 from trunk:
*) On z/OS, apr_sockaddr_info_get() with family == APR_UNSPEC was not
returning IPv4 addresses if any IPv6 addresses were returned.
[Eric Covener]
Modified:
apr/apr/branches/1.5.x/ (props changed)
apr/apr/branches/1.5.x/CHANGES
apr/apr/branches/1.5.x/network_io/unix/sockaddr.c
Propchange: apr/apr/branches/1.5.x/
------------------------------------------------------------------------------
Merged /apr/apr/trunk:r1634615
Modified: apr/apr/branches/1.5.x/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/CHANGES?rev=1634619&r1=1634618&r2=1634619&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/CHANGES [utf-8] (original)
+++ apr/apr/branches/1.5.x/CHANGES [utf-8] Mon Oct 27 17:51:38 2014
@@ -1,6 +1,10 @@
-*- coding: utf-8 -*-
Changes for APR 1.5.2
+ *) On z/OS, apr_sockaddr_info_get() with family == APR_UNSPEC was not
+ returning IPv4 addresses if any IPv6 addresses were returned.
+ [Eric Covener]
+
*) Windows cmake build: Fix an incompatibility with cmake 2.8.12 and
later. [Jeff Trawick]
Modified: apr/apr/branches/1.5.x/network_io/unix/sockaddr.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/network_io/unix/sockaddr.c?rev=1634619&r1=1634618&r2=1634619&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/network_io/unix/sockaddr.c (original)
+++ apr/apr/branches/1.5.x/network_io/unix/sockaddr.c Mon Oct 27 17:51:38 2014
@@ -325,6 +325,16 @@ static apr_status_t call_resolver(apr_so
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