Apache 2.3.10-alpha, mod_security 2.5.13 & mod_geoip +IPv6 Released

Started by Gregg, December 22, 2010, 02:33:01 AM

Previous topic - Next topic

Gregg


mario


Sob

It seems there's something wrong with your mod_geoip. It kills Apache child process ("Parent: child process exited with status 255 -- Restarting.") in x64 version, while x86 version just ignores IPv6 addresses and looks only in GeoIP.dat (checked by Process Monitor). Version compiled by myself works correctly (only x64 tested, I had some problem linking to x86 AH release and was lazy to compile the whole thing).

Any idea what might be different?

How to test it even without IPv6:

- set GeoIPScanProxyHeaders On
- put simple test script on server:
<?php
  
foreach($_SERVER as $key=>$val) {
    if(
substr($key03)=='GEO') echo $key.' = '.$val.'<br>';
  }
?>

- run "telnet <your server ip> <port>" and type:
GET /path/to/testscript.php HTTP/1.0
Host: www.yourserver.tld
X-Forwarded-For: 2a00:1450:8007::67


You can fake any IP in X-Forwarded-For. The above one belongs to Google and GeoIP should report Ireland as country.

Gregg

Yep, I missed a patch darnit. Will do over tonight.
Till then I've removed announcement on front page & binaries from download page.

Gregg


Gregg

I get bad headers when I try to test this via telnet ... so, here's an x86 one. Please try it, if it works I'll move the same source to the x64 box & build x64.

http://www.apachehaus.net/modules/mod_geoip-ipv6.zip

Sob

Quotemod_geoip.obj: error LNK2019: unresolved external symbol _ap_add_common_vars referenced in function _geoip_header_parser

But it's not exactly true, the symbol exists in libhttpd.lib, except it's named "_ap_add_common_vars@4". Seems like some different naming convention or something, don't know where it comes from.

Tried your new x86 module and at the first sight it works fine.

Gregg

Thanks for testing it. I'll do the x64 now, repackage and release.

Ah yes, ap_add_common_vars() requires util_script.h to be included in mod_geoip.c and on line ~301 removing the unused

GeoIP *gip;

makes it compile without warnings.


Gregg