Changes of Revision 2
[-] | Changed | apache2-mod_geoip.spec |
x 1
2 Url: http://www.maxmind.com/app/mod_geoip 3 Source0: http://www.maxmind.com/download/geoip/api/mod_geoip2/%{modname}%{modapaver}_%{version}.tar.gz 4 Source1: mod_geoip.conf 5 +Patch0: apache24.patch 6 BuildRoot: %{_tmppath}/%{name}-%{version}-build 7 Requires: GeoIP 8 BuildRequires: libGeoIP-devel 9
10 %debug_package 11 %prep 12 %setup -n %{modname}%{modapaver}_%{version} 13 +%patch0 -p1 14 15 %build 16 %{apxs} -a -L%{_libdir} -I%{_includedir} -lGeoIP -c %{modname}.c 17 |
||
[+] | Added | apache24.patch ^ |
@@ -0,0 +1,20 @@ +--- mod_geoip2_1.2.7/mod_geoip.c.orig 2013-07-28 11:16:59.809025424 +0200 ++++ mod_geoip2_1.2.7/mod_geoip.c 2013-07-28 11:17:39.021026627 +0200 +@@ -322,7 +322,7 @@ + return DECLINED; + + if (!cfg->scanProxyHeaders) { +- ipaddr = r->connection->remote_ip; ++ ipaddr = r->connection->client_ip; + } + else { + ap_add_common_vars(r); +@@ -340,7 +340,7 @@ + } + if (!ipaddr_ptr) { + ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, 0, r->server, "[mod_geoip]: Error while getting ipaddr from proxy headers. Using REMOTE_ADDR."); +- ipaddr = r->connection->remote_ip; ++ ipaddr = r->connection->client_ip; + } + else { + ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, 0, r->server, "[mod_geoip]: IPADDR_PTR: %s", ipaddr_ptr); |