William McKee wrote:
Hi,

I am seeking some assistance in tracking down a problem with building
Apache 2.0.53 + mod_perl2.0.0-RC4 under a FreeBSD 5.3 jailed
environment using gcc 3.4.2 and perl 5.8.6.

One of the mod_perl tests is failing because it is getting a different
remote_ip address than the address being reported by result of
c->remote_ip. Apache's method is getting the real ip address whereas
mod_perl is getting the loopback address.

It has nothing to do with mod_perl, William. It's Apache-Test that you are after, which is used to test mod_perl.


Both of these are correct but I need to figure out how to get them to
match. I tried looking through the httpd source files but am not a C
programmer and did not have much luck finding the section where
remote_ip is set. Could someone give me a hand?

it's set in server/core.c:

  apr_sockaddr_ip_get(&c->remote_ip, c->remote_addr);

it obtains this information from the live socket connected to a client, whereas Apache-Test tries to resolve the hostname of your machine since at the time when it sets this value there is no connection yet. So as I've replied at the modperl list, you want to figure out how to make Apache-Test report the same value as if it had a live connection from the same machine. If you want to discuss how this can be done, let's do that on the test-dev list where this discussion belongs.

Thanks.

--
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Reply via email to