mod_remoteip.c

Checkout Tools
  • last updated 4 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates

Changeset 1776575 is being indexed.

Merge new PROXY protocol code into mod_remoteip
  1. … 2 more files in changeset.
mod_remoteip: Set useragent port to zero PR59931

When overriding the useragent address from X-Forwarded-For,

zero out what had been initialized as the connection-level port.

Submitted By: Hank Ibell <hwibell gmail.com>

  1. … 1 more file in changeset.
mod_remoteip: Use r->useragent_addr as the root trusted address for verifying.

This fixes issue resulting in setting of bad useragent_ip when internal

redirection has been generated as response to the request (typically as

result of "ErrorDocument 40x").

In this case, the original request has been handled by mod_remoteip and its

useragent_ip has been changed properly, but when internal redirection

to ErrorDocument has been generated later, the mod_remoteip's handler has been

executed again with *the same* c->client_addr as in the original request. If

c->client_addr IP is trusted, this results in bad useragent_ip being set.

When using r->useragent_addr as the root trusted address instead of

c->client_addr, the internal redirection uses the first non-trusted

IP in this particular case, so it won't change the r->useragent_ip during

the internal redirection to ErrorDocument.

Prevent an external proxy from presenting an internal proxy

in mod_remoteip.c. PR 55962.

  1. … 1 more file in changeset.
Use the correct IP addresses to populate the proxy_ips field

in mod_remoteip.c. PR 55972.

  1. … 1 more file in changeset.
Correct the trusted proxy match test in mod_remoteip. PR 54651.\n\nSubmitted By: Yoshinori Ehara <yoshinori ehara gmail com>\nEndorsed By: Eugene L <eugenel amazon com>\nCommited By: mrumph
  1. … 1 more file in changeset.
s/equivalant/equivalent/ in comments
  1. … 1 more file in changeset.
Remove redundant check
s/ip/IP/ in comments
Close file in error path.
Use %pm available since apr 1.3 instead of an extra call to apr_strerror

  1. … 5 more files in changeset.
remove warning:

mod_remoteip.c:404:38: warning: data argument not used by format string [-Wformat-extra-args]

It's a hack, but maintain the orig hack ;)

Downgrade log message about adjusted IP address to trace1

Further clarify the naming of the entity that directly connects to us by

calling that entity a client instead of a peer.

  1. … 15 more files in changeset.
Further clarify the naming of the entity that originates the request by

calling that entity a useragent instead of a client.

  1. … 14 more files in changeset.
Remove usage of APLOG_NOERRNO. It has been a no-op since at least 2.0.x

  1. … 5 more files in changeset.
Add lots of unique tags to error log messages

  1. … 172 more files in changeset.
Introduce a per connection "peer_ip" and a per request "client_ip" to

distinguish between the raw IP address of the connection and the effective

IP address of the request.

  1. … 23 more files in changeset.
Introduce a per request version of the remote IP address, which can be

optionally modified by a module when the effective IP of the client

is not the same as the real IP of the client (such as a load balancer).

  1. … 17 more files in changeset.
Style fixes, no functional change.

Fix configuration of internal proxies

PR: 49272

Submitted by: Jim Riggs <jim riggs me>

  1. … 1 more file in changeset.
Cleanup effort in prep for GA push:

Trim trailing whitespace... no func change

  1. … 118 more files in changeset.
more temp pool usage and remove some useless apr_pstrdup()s

  1. … 5 more files in changeset.
* - temp_sa is already the correct pointer

- use temp_sa instead of temp_sa_buff which is not a pointer

Pointed by: Andrew Skalski <voltara gmail.com>

* temp_sa is already the correct pointer.

PR: 49838

Submitted by: Andrew Skalski <voltara gmail.com>

Reviewed by: rpluem

  1. … 1 more file in changeset.
Use the new APLOG_USE_MODULE/AP_DECLARE_MODULE macros everywhere to take

advantage of per-module loglevels

  1. … 169 more files in changeset.
comment change, no functional change

* Don't assign pointers to int's. This is a nightmare when changeing

between 32 and 64 bit and waiting for an accident to happen.

Also: It produces compiler warnings (at least 64 bit) :-).

Introduce mod_remoteip to trunk from httpd/sandbox/mod_remoteip
  1. … 5 more files in changeset.