From: Stefan Eissing Date: Mon, 19 Mar 2018 13:07:52 +0000 (+0000) Subject: mod_remoteip: make proxy-protocol work on slave connections, e.g. in HTTP/2 X-Git-Tag: 2.5.0-alpha2-ci-test-only~2775 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1b7278e319a882aed7401e02ce83cbc502e9c63;p=thirdparty%2Fapache%2Fhttpd.git 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 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1827196 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 27352252abd..36250c224d6 100644 --- 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] diff --git a/modules/metadata/mod_remoteip.c b/modules/metadata/mod_remoteip.c index 4f60c2f98d9..891db08c151 100644 --- a/modules/metadata/mod_remoteip.c +++ b/modules/metadata/mod_remoteip.c @@ -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; }