From: Stefan Fritsch Date: Tue, 18 Oct 2011 20:10:48 +0000 (+0000) Subject: Fix configuration of internal proxies X-Git-Tag: 2.3.15~115 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1596edb4a2cc8d023b64e23d11ac73454737018a;p=apache Fix configuration of internal proxies PR: 49272 Submitted by: Jim Riggs git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1185828 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 5830cc5cb7..28d8a9ef08 100644 --- a/CHANGES +++ b/CHANGES @@ -12,6 +12,9 @@ Changes with Apache 2.3.15 PR 51714. [Stefan Fritsch, Jim Jagielski, Ruediger Pluem, Eric Covener, ] + *) mod_remote_ip: Fix configuration of internal proxies. PR 49272. + [Jim Riggs ] + *) mpm_winnt: Handle AcceptFilter 'none' mode correctly; resolve specific server IP endpoint and remote client IP upon connection. [William Rowe] diff --git a/modules/metadata/mod_remoteip.c b/modules/metadata/mod_remoteip.c index 4a73a24c14..2a9ca7dd4f 100644 --- a/modules/metadata/mod_remoteip.c +++ b/modules/metadata/mod_remoteip.c @@ -127,7 +127,7 @@ static int looks_like_ip(const char *ipstr) return (*ipstr == '\0'); } -static const char *proxies_set(cmd_parms *cmd, void *internal, +static const char *proxies_set(cmd_parms *cmd, void *cfg, const char *arg) { remoteip_config_t *config = ap_get_module_config(cmd->server->module_config, @@ -142,7 +142,7 @@ static const char *proxies_set(cmd_parms *cmd, void *internal, if (!config->proxymatch_ip) config->proxymatch_ip = apr_array_make(cmd->pool, 1, sizeof(*match)); match = (remoteip_proxymatch_t *) apr_array_push(config->proxymatch_ip); - match->internal = internal; + match->internal = cmd->info; if (looks_like_ip(ip)) { /* Note s may be null, that's fine (explicit host) */ @@ -168,7 +168,7 @@ static const char *proxies_set(cmd_parms *cmd, void *internal, break; match = (remoteip_proxymatch_t *) apr_array_push(config->proxymatch_ip); - match->internal = internal; + match->internal = cmd->info; } } @@ -182,7 +182,7 @@ static const char *proxies_set(cmd_parms *cmd, void *internal, return NULL; } -static const char *proxylist_read(cmd_parms *cmd, void *internal, +static const char *proxylist_read(cmd_parms *cmd, void *cfg, const char *filename) { char lbuf[MAX_STRING_LEN]; @@ -205,7 +205,7 @@ static const char *proxylist_read(cmd_parms *cmd, void *internal, while (*(arg = ap_getword_conf(cmd->temp_pool, &args)) != '\0') { if (*arg == '#' || *arg == '\0') break; - errmsg = proxies_set(cmd, internal, arg); + errmsg = proxies_set(cmd, cfg, arg); if (errmsg) { errmsg = apr_psprintf(cmd->pool, "%s at line %d of %s", errmsg, cfp->line_number, filename);