Skip to content

Invalid lookup? #11

@pooleja

Description

@pooleja

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions