]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_remoteip: make proxy-protocol work on slave connections, e.g. in HTTP/2
authorStefan Eissing <icing@apache.org>
Mon, 19 Mar 2018 13:07:52 +0000 (13:07 +0000)
committerStefan Eissing <icing@apache.org>
Mon, 19 Mar 2018 13:07:52 +0000 (13:07 +0000)
     requests. See also https://github.com/roadrunner2/mod-proxy-protocol/issues/6

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1827196 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/metadata/mod_remoteip.c

diff --git a/CHANGES b/CHANGES
index 27352252abdb5d8f2d06a730b3a5ff1a01355366..36250c224d6c4785ffaaada8112fbeb143194ae7 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,10 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.1
 
+  *) mod_remoteip: make proxy-protocol work on slave connections, e.g. in HTTP/2
+     requests. See also https://github.com/roadrunner2/mod-proxy-protocol/issues/6
+     [Stefan Eissing]
+
   *) mod_md: fixes error in renew window calculation that may lead to mod_md running
      watchdog in a tight loop until actual renewal becomes necessary. [Stefan Eissing]
 
index 4f60c2f98d96e382d5554df9f29f7544343535a5..891db08c151ff1fff0cfc3a177322dc472b47e80 100644 (file)
@@ -855,8 +855,13 @@ static int remoteip_hook_pre_connection(conn_rec *c, void *csd)
     remoteip_conn_config_t *conn_conf;
     int i;
 
-    /* Do not attempt to manipulate slave connections */
+    /* Establish master config in slave connections, so that request processing
+     * finds it. */
     if (c->master != NULL) {
+        conn_conf = ap_get_module_config(c->master->conn_config, &remoteip_module);
+        if (conn_conf) {
+            ap_set_module_config(c->conn_config, &remoteip_module, conn_conf);
+        }
         return DECLINED;
     }