You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by sf...@apache.org on 2011/10/18 22:10:49 UTC
svn commit: r1185828 - in /httpd/httpd/trunk: CHANGES
modules/metadata/mod_remoteip.c
Author: sf
Date: Tue Oct 18 20:10:48 2011
New Revision: 1185828
URL: http://svn.apache.org/viewvc?rev=1185828&view=rev
Log:
Fix configuration of internal proxies
PR: 49272
Submitted by: Jim Riggs <jim riggs me>
Modified:
httpd/httpd/trunk/CHANGES
httpd/httpd/trunk/modules/metadata/mod_remoteip.c
Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1185828&r1=1185827&r2=1185828&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Tue Oct 18 20:10:48 2011
@@ -12,6 +12,9 @@ Changes with Apache 2.3.15
PR 51714. [Stefan Fritsch, Jim Jagielski, Ruediger Pluem, Eric Covener,
<lowprio20 gmail.com>]
+ *) mod_remote_ip: Fix configuration of internal proxies. PR 49272.
+ [Jim Riggs <jim riggs me>]
+
*) mpm_winnt: Handle AcceptFilter 'none' mode correctly; resolve specific
server IP endpoint and remote client IP upon connection. [William Rowe]
Modified: httpd/httpd/trunk/modules/metadata/mod_remoteip.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/metadata/mod_remoteip.c?rev=1185828&r1=1185827&r2=1185828&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/metadata/mod_remoteip.c (original)
+++ httpd/httpd/trunk/modules/metadata/mod_remoteip.c Tue Oct 18 20:10:48 2011
@@ -127,7 +127,7 @@ static int looks_like_ip(const char *ips
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
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
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
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_pa
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);