mod_geoip crashes lighttpd 1.5.x on FreeBSD 7.2 AMD64
The backtrace will look something like this:
#0 0x0000000801809660 in _GeoIP_addr_to_num () from /usr/local/lib/libGeoIP.so.5
Looking further into this, this function is passed the addr from mod_geoip.c:228:
remote_ip = inet_ntop_cache_get_ip(srv, &(con->dst_addr));
remote_ip here is what is passed to the above function that fails. I am not quite sure why we are calling inet_ntop_cache_get_ip() since this is already called in connections.c, and the dst_addr_buf field is populated with the results. Changing the above line (mod_geoip.c:228) to:
remote_ip = con->dst_addr_buf->ptr;
fixes this and saves a few cycles. There may be a similar problem in mod_trigger_b4_dl, but I do not use that module.
(add to default build to reduce distributor package maintenance)
"broken module API since 1.4.38"
"lighttpd-1.4.24 fails to compile with mod_geoip.c"
"unsafe sprintfs mod_geoip"
"mod_geoip crashes lighttpd 1.5.x on FreeBSD 7.2 AMD64"
"lighttpd 1.4 crashes on FreeBSD 7.0 AMD64 when mod_geoip compiled in"
#1 Updated by gstrauss over 1 year ago
Added reference to this page at https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModGeoip/
#3 Updated by gstrauss over 1 year ago
Please close ticket. Patch posted to wiki https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModGeoip
Also available in: Atom