]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1775775 from trunk:
authorJim Jagielski <jim@apache.org>
Mon, 9 Jan 2017 14:47:40 +0000 (14:47 +0000)
committerJim Jagielski <jim@apache.org>
Mon, 9 Jan 2017 14:47:40 +0000 (14:47 +0000)
mod_proxy_{ajp,fcgi}: Fix a possible crash when reusing an established
backend connection, happening with LogLevel trace2 or higher configured,
or at any log level with compilers not detected as C99 compliant (e.g.
MSVC on Windows).

Submitted by: ylavic
Reviewed by: ylavic, jim, covener

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1777975 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/proxy/proxy_util.c

diff --git a/CHANGES b/CHANGES
index 8fc388bccc9532e2e817c939ffbf67cdd36b387c..b109fe1c12072d4d5bb723e3085b6cc86f6a2685 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -16,6 +16,11 @@ Changes with Apache 2.4.26
   *) mod_http2: cleanup beamer registry on server reload, Fixes PR60510.
      [Pavel Mateja <pavel@verotel.cz>, Stefan Eissing]
      
+  *) mod_proxy_{ajp,fcgi}: Fix a possible crash when reusing an established
+     backend connection, happening with LogLevel trace2 or higher configured,
+     or at any log level with compilers not detected as C99 compliant (e.g.
+     MSVC on Windows).  [Yann Ylavic]
+
   *) mod_ext_filter: Don't interfere with "error buckets" issued by other
      modules. PR60375.  [Eric Covener, Lubos Uhliarik]
 
diff --git a/STATUS b/STATUS
index 0cfbffe81a519368606075a9885a9ab05d724733..20fd38ebb63baf228a0e26fcc3bb5948ed330889 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -119,13 +119,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  *) mod_proxy_{ajp,fcgi}: Fix a possible crash when reusing an established
-     backend connection, happening with LogLevel trace2 or higher configured,
-     or at any log level with compilers not detected as C99 compliant (e.g.
-     MSVC on Windows).
-     trunk patch: http://svn.apache.org/r1775775
-     2.4 patch: trunk works (modulo CHANGES)
-     +1: ylavic, jim, covener
 
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
index 6444b6899e3ca20a4aa95fdcfa6762c7db56da85..663c3af57ade4ab9a0b7f1592bb800128f126a41 100644 (file)
@@ -2693,10 +2693,13 @@ PROXY_DECLARE(apr_status_t) ap_proxy_check_connection(const char *scheme,
     }
 
     if (rv == APR_SUCCESS) {
-        ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, server,
-                     "%s: reusing backend connection %pI<>%pI",
-                     scheme, conn->connection->local_addr,
-                     conn->connection->client_addr);
+        if (APLOGtrace2(server)) {
+            apr_sockaddr_t *local_addr = NULL;
+            apr_socket_addr_get(&local_addr, APR_LOCAL, conn->sock);
+            ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, server,
+                         "%s: reusing backend connection %pI<>%pI",
+                         scheme, local_addr, conn->addr);
+        }
     }
     else if (conn->sock) {
         /* This clears conn->scpool (and associated data), so backup and