node-geoip-native
node-geoip-native copied to clipboard
Invalid lookup?
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"