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

Some IPv6 addresses cause parsing errors #62

Open
tobias47n9e opened this issue Feb 10, 2021 · 2 comments
Open

Some IPv6 addresses cause parsing errors #62

tobias47n9e opened this issue Feb 10, 2021 · 2 comments

Comments

@tobias47n9e
Copy link

When using

new IPv6("::ffff:172.20.0.6");

I get an error:

Error: Given string is already longer than given final length after padding: 4
leftPadWithZeroBit BinaryUtils.js:68
paddedArray IPv6Utils.js:16
expandWithZero IPv6Utils.js:15
expandIPv6Number IPv6Utils.js:40
IPv6 IPNumber.js:537

With some research I found that the standard (not sure if there is a standard?) notation for this would be 0:0:0:0:0:ffff:ac14:6. Would it be possible for the IPv6 method to handle this case if its just a different notation?

@dadepo
Copy link
Member

dadepo commented Feb 11, 2021

Thanks for bringing this up. I'll take a look and see if this needs fixing in the library. Will update once I have new info.

@dadepo
Copy link
Member

dadepo commented Feb 12, 2021

This falls under IPv4/IPv6 Translation and an issue already exist for it here #32. Hopefully should get around to implement this soon.

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

2 participants