spot-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leda G. Lima" <led...@apache.org>
Subject Re: Bug in get_ip_geo_localization
Date Fri, 29 Sep 2017 18:16:18 GMT
Hi

You are right in your appreciations.

The code was developed to work with that specific file version, which is
definitely not free.
The best approach would be to consider different file schemas, dynamic
columns and unordered data.

Regards

Gabriela Lima


2017-09-28 14:23 GMT-05:00 Castille Epee <castleguarders@gmail.com>:

> Folks,
>
> A couple of issues in how geoloc lookup is being done.
>
> a) There is an assumption that the iploc.csv is in sorted ascending order.
> b) The bisect.bisect method used (even if the iploc.csv was sorted) would
> only work if the iploc had no discontinuities, there is no check after
> bisect call to see if the actual IP being looked up existed in the range.
> It should have checked for the IP falling in the range before returning it.
>
> Before we gen up a patch, could someone confirm if the above analysis is
> correct?
>
> We have created some scripts to create a iploc.csv file from public sources
> (- domain / owner information). If there is any interest drop me note.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message