From 19057ff87f8f9ce3393cdfae75f13f4a4483e3f7 Mon Sep 17 00:00:00 2001 From: Jason Fesler Date: Sat, 18 Apr 2020 19:56:01 -0700 Subject: RIP working --- mod_ip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mod_ip.c') diff --git a/mod_ip.c b/mod_ip.c index be41481..21baaaa 100644 --- a/mod_ip.c +++ b/mod_ip.c @@ -370,13 +370,13 @@ gen_output (request_rec * r, struct mod_ip_request_t *formdata) RIP = escape_string (r, (char *) apr_table_get (r->headers_in, "X-Real-IP")); VIA = escape_string (r, (char *) apr_table_get (r->headers_in, "Via")); - if (strlen(VIA)>0) + if (strlen(RIP)>0) myip = RIP; if (!myip) myip = "0.0.0.0 undefined"; if (formdata->testip) myip = formdata->testip; - + /* If Teredo or 6to4, don't do ASN lookups. The data will always show *some* ISP, but it isn't ours.*/ if ((strncmp(myip,"2001:0:",7)==NULL) || (strncmp(myip,"2002:",5)==NULL)) { formdata->getasn=0; -- cgit v1.2.3