httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe Jr." <wr...@rowe-clan.net>
Subject client_ip vs remote_ip
Date Wed, 23 Nov 2011 17:56:25 GMT
On 11/23/2011 2:02 AM, Nick Kew wrote:
>
> On 22 Nov 2011, at 22:35, Graham Leggett wrote:
>
>> On 22 Nov 2011, at 11:45 PM, Nick Kew wrote:
>>
>>> Huh?  Surely tcp details belong to the connection, and are accessible
>>> from the request_rec as r->conn->remote_ip ?
>>
>> They do until a load balancer comes along and sits in the way, obscuring the remote
IP address. Suddenly the IP address is different on every request, even though the connection
between httpd and the load balancer is constant and lasts a long time using keepalives.
>
> Wherein lies the problem.  How confusing is it to have r->remote_ip
> and r->conn->remote_ip *and for them to be different*?
>
> These need distinct names to distinguish them!
> e.g. r->client_ip vs r->conn->remote_ip - obviously keep the latter!

+1 to this rename, it's much more sensible than "effective", "phys",
"" et al, but reverse them.

client_ip / client_addr is the immediate client of httpd, which may
be a load balancer or transparent proxy or normal proxy if mod_remoteip
has been introduced.

remote_ip / remote_addr is the recognized _authenticated_ address.

This has the additional advantage of *breaking* existing c->remote_ip
references and forcing the module author to choose which they mean for
their purposes (most would refer to the authenticated address).

Bill


Mime
View raw message