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 IPv4 Mapped IPv6 Addresses don't parse #171

Closed
liaorg opened this issue Oct 7, 2023 · 4 comments · Fixed by #174
Closed

Some IPv4 Mapped IPv6 Addresses don't parse #171

liaorg opened this issue Oct 7, 2023 · 4 comments · Fixed by #174

Comments

@liaorg
Copy link

liaorg commented Oct 7, 2023

The following calls throw exceptions:

ipaddr.IPv6.parse("FFFF::255.255.255.255")
throw :
Error: ipaddr: the address has neither IPv6 nor IPv4 format

but
ipaddr.IPv6.parser("FFFF::0:255.255.255.255") is ok!

QQ图片20231007143751

I'm using version 2.1.0

@whitequark
Copy link
Owner

Yep that's a bug.

@liaorg
Copy link
Author

liaorg commented Oct 8, 2023

Yep that's a bug.

can you fix it , and when? thanks @whitequark

@whitequark
Copy link
Owner

This library is passively maintained: if an acceptable fix is proposed I will merge it and release a new version. Otherwise no.

Johann150 added a commit to Johann150/ipaddr.js that referenced this issue Jan 23, 2024
Johann150 added a commit to Johann150/ipaddr.js that referenced this issue Jan 23, 2024
whitequark pushed a commit that referenced this issue Jan 25, 2024
samualtnorman pushed a commit to samualtnorman/internet-address that referenced this issue Apr 7, 2024
@takapiro99
Copy link

@liaorg

It looks like the ipv6 parsing logic has changed in v2.2.

According to the RFC, the format of "IPv4-Mapped IPv6 Address" is ::FFFF:0:0/96. I think the format of FFFF::0:0/96 is a violation.

I am not a network engineer, so I don't know the actual situation, but wouldn't it be better to fix the logic of the parsing according to the RFC?

If you have any other background, please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants