node-geoip-native icon indicating copy to clipboard operation
node-geoip-native copied to clipboard

Invalid lookup?

Open pooleja opened this issue 8 years ago • 0 comments

I noticed a bug in my app for IP "207.47.0.226". It was not showing up as US, even though the CSV says it should have.

I rewrote the binary search and verified it works as expected, so I think there is a bug lurking in the binary search lookup code.

console.log(geoip.lookup('207.47.0.226'))
// { ipstart: 3277684736, code: 'RU', name: 'Russian Federation' }

Proper CSV Line it should have matched:

"207.46.90.0","207.47.127.255","3475921408","3475996671","US","United States"

pooleja avatar Dec 18 '17 23:12 pooleja