summaryrefslogtreecommitdiff
path: root/network/mod_geoip2/mod_geoip-httpd24.patch
diff options
context:
space:
mode:
authorRobby Workman <rworkman@slackbuilds.org>2012-09-18 17:52:55 -0500
committerRobby Workman <rworkman@slackbuilds.org>2012-09-18 17:52:55 -0500
commitfb4c28efe5acb18fd977c064c90e18686a0acb71 (patch)
tree1d5c7641b85a60a46633552d251c4c3c745d4b38 /network/mod_geoip2/mod_geoip-httpd24.patch
parentaf4613b39d4c1a03ecb4e7861e3bae6c07db5459 (diff)
downloadslackbuilds-fb4c28efe5acb18fd977c064c90e18686a0acb71.tar.gz
network/mod_geoip2: Updated for version 1.2.7.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'network/mod_geoip2/mod_geoip-httpd24.patch')
-rw-r--r--network/mod_geoip2/mod_geoip-httpd24.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/network/mod_geoip2/mod_geoip-httpd24.patch b/network/mod_geoip2/mod_geoip-httpd24.patch
new file mode 100644
index 0000000000..563e35b113
--- /dev/null
+++ b/network/mod_geoip2/mod_geoip-httpd24.patch
@@ -0,0 +1,35 @@
+--- mod_geoip.c.geoip
++++ mod_geoip.c
+@@ -66,6 +66,7 @@
+ #include "http_config.h"
+ #include "http_protocol.h"
+ #include "http_log.h"
++#include "util_script.h"
+ #include "ap_config.h"
+ #include "apr_strings.h"
+ #include <GeoIP.h>
+@@ -320,7 +321,11 @@
+ return DECLINED;
+
+ if (!cfg->scanProxyHeaders) {
++#if AP_MODULE_MAGIC_AT_LEAST(20111130,0)
++ ipaddr = r->useragent_ip;
++#else
+ ipaddr = r->connection->remote_ip;
++#endif
+ }
+ else {
+ ap_add_common_vars(r);
+@@ -338,7 +343,11 @@
+ }
+ 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;
++#if AP_MODULE_MAGIC_AT_LEAST(20111130,0)
++ ipaddr = r->useragent_ip;
++#else
++ ipaddr = r->connection->remote_ip;
++#endif
+ }
+ else {
+ ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, 0, r->server, "[mod_geoip]: IPADDR_PTR: %s", ipaddr_ptr);