You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by jo...@apache.org on 2023/02/03 16:29:44 UTC

svn commit: r1907245 - in /apr/apr-util/branches/1.6.x: ./ CHANGES memcache/apr_memcache.c

Author: jorton
Date: Fri Feb  3 16:29:44 2023
New Revision: 1907245

URL: http://svn.apache.org/viewvc?rev=1907245&view=rev
Log:
Merge r1907242 from trunk:

* memcache/apr_memcache.c (conn_connect): Allow use of IPv6
  rather than forcing name resolution to IPv4 only.

Submitted by: Lubos Uhliarik <luhliari redhat.com>
Github: closes #39

Modified:
    apr/apr-util/branches/1.6.x/   (props changed)
    apr/apr-util/branches/1.6.x/CHANGES
    apr/apr-util/branches/1.6.x/memcache/apr_memcache.c

Propchange: apr/apr-util/branches/1.6.x/
------------------------------------------------------------------------------
  Merged /apr/apr/trunk:r1906347,1907242

Modified: apr/apr-util/branches/1.6.x/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.6.x/CHANGES?rev=1907245&r1=1907244&r2=1907245&view=diff
==============================================================================
--- apr/apr-util/branches/1.6.x/CHANGES [utf-8] (original)
+++ apr/apr-util/branches/1.6.x/CHANGES [utf-8] Fri Feb  3 16:29:44 2023
@@ -1,6 +1,9 @@
                                                      -*- coding: utf-8 -*-
 Changes with APR-util 1.6.4
 
+  *) apr_memcache: Fix name lookup to allow IPv6 as well as IPv4.
+     [Lubos Uhliarik <luhliari redhat.com>]
+
 Changes with APR-util 1.6.3
 
   *) Correct a packaging issue in 1.6.2. The contents of the release were

Modified: apr/apr-util/branches/1.6.x/memcache/apr_memcache.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.6.x/memcache/apr_memcache.c?rev=1907245&r1=1907244&r2=1907245&view=diff
==============================================================================
--- apr/apr-util/branches/1.6.x/memcache/apr_memcache.c (original)
+++ apr/apr-util/branches/1.6.x/memcache/apr_memcache.c Fri Feb  3 16:29:44 2023
@@ -290,9 +290,9 @@ static apr_status_t conn_connect(apr_mem
     apr_status_t rv = APR_SUCCESS;
     apr_sockaddr_t *sa;
 #if APR_HAVE_SOCKADDR_UN
-    apr_int32_t family = conn->ms->host[0] != '/' ? APR_INET : APR_UNIX;
+    apr_int32_t family = conn->ms->host[0] != '/' ? APR_UNSPEC : APR_UNIX;
 #else
-    apr_int32_t family = APR_INET;
+    apr_int32_t family = APR_UNSPEC;
 #endif
 
     rv = apr_sockaddr_info_get(&sa, conn->ms->host, family, conn->ms->port, 0, conn->p);
@@ -328,9 +328,9 @@ mc_conn_construct(void **conn_, void *pa
     apr_pool_t *tp;
     apr_memcache_server_t *ms = params;
 #if APR_HAVE_SOCKADDR_UN
-    apr_int32_t family = ms->host[0] != '/' ? APR_INET : APR_UNIX;
+    apr_int32_t family = ms->host[0] != '/' ? APR_UNSPEC : APR_UNIX;
 #else
-    apr_int32_t family = APR_INET;
+    apr_int32_t family = APR_UNSPEC;
 #endif
 
     rv = apr_pool_create(&np, pool);