Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Same ipv6 address, different results of utils.aton6 #206

Open
rlaace423 opened this issue Jul 2, 2020 · 0 comments
Open

Same ipv6 address, different results of utils.aton6 #206

rlaace423 opened this issue Jul 2, 2020 · 0 comments

Comments

@rlaace423
Copy link

Hello, I'm testing geoip-lite library with IPv6 addresses.

I found weird results about utils.aton6 functions.

Here's 2 addresses which are exactly same,

  • 2607:f0d0:1002:51::4
  • 2607:f0d0:1002:0051:0000:0000:0000:0004

And results of utils.aton6 function

  • [ 638054608, 268566609, 4, 4 ]
  • [ 638054608, 268566609, 0, 4 ]

Even though they are different, I know that that doesn't affect lookup function because utils.cmp6() only cares about IPv6 array's first and second elements.

Is it bug? Or do I miss anything?

michael-2956 added a commit to michael-2956/node-geoip that referenced this issue Jul 23, 2021
This will produce correct results for both ips featured in the issue. Deals with :: abbreviation properly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant