[mirrorbrain-commits] [mod_asn] r84 - /trunk/mod_asn.c

From: <poeml_at_mirrorbrain.org>
Date: Sun, 05 Sep 2010 17:50:05 -0000
Author: poeml
Date: Sun Sep  5 19:50:03 2010
New Revision: 84

URL: http://svn.mirrorbrain.org/viewvc/mod_asn?rev=84&view=rev
Log:
Avoid looking up IPv6 addresses. The AS-database is IPv4-only, and in addition,
attempted lookups seem to cause problems. See issue #58.

Modified:
    trunk/mod_asn.c

Modified: trunk/mod_asn.c
URL: http://svn.mirrorbrain.org/viewvc/mod_asn/trunk/mod_asn.c?rev=84&r1=83&r2=84&view=diff
==============================================================================
--- trunk/mod_asn.c (original)
+++ trunk/mod_asn.c Sun Sep  5 19:50:03 2010
_at_@ -297,6 +297,12 @@
 
     if (!clientip) {
         debugLog(r, cfg, "empty client ip... not doing a lookup");
+        asn_dbd_close_fn(r->server, dbd);
+        return DECLINED;
+    }
+
+    if (ap_strchr_c(clientip, ':')) {
+        debugLog(r, cfg, "IPv6 address lookup is not supported (%s)", clientip);
         asn_dbd_close_fn(r->server, dbd);
         return DECLINED;
     }




_______________________________________________
mirrorbrain-commits mailing list
Archive: http://mirrorbrain.org/archive/mirrorbrain-commits/

Note: To remove yourself from this list, send a mail with the content
 	unsubscribe
to the address mirrorbrain-commits-request_at_mirrorbrain.org
Received on Sun Sep 05 2010 - 17:50:09 GMT

This archive was generated by hypermail 2.3.0 : Mon Feb 20 2012 - 23:47:04 GMT