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

InetAddresses.forString does not correctly handle IPv6 addresses with scope_id #1557

Closed
gissuebot opened this issue Oct 31, 2014 · 3 comments
Labels

Comments

@gissuebot
Copy link

Original issue created by lothix on 2013-10-16 at 08:57 PM


Issue: InetAddresses.forString throws IllegalArgumentException when given IPv6 address with scope_id instead of returning the correct Inet6Address with scope_id, and scope_id_set populated.

Affected guava versions: InetAddresses in all up to 15.0

Failing test case:

InetAddress ipv6AddressWithScopeId = InetAddresses.forString("fe80:0:0:0:c1e1:54cf:68bc:9d5e%12");

throws java.lang.IllegalArgumentException: 'fe80:0:0:0:c1e1:54cf:68bc:9d5e%12' is not an IP string literal.

InetAddresses.isInetAddress("fe80:0:0:0:c1e1:54cf:68bc:9d5e%12") return false.

Expected results:

InetAddresses.forString("fe80:0:0:0:c1e1:54cf:68bc:9d5e%12") returns Inet6Address(addr = "fe80:0:0:0:c1e1:54cf:68bc:9d5e", scope_id = 12);

InetAddresses.isInetAddress("fe80:0:0:0:c1e1:54cf:68bc:9d5e%12") returns true.

@gissuebot
Copy link
Author

Original comment posted by kevinb@google.com on 2013-11-20 at 08:16 PM


(No comment entered for this change.)


Status: Research
Labels: Package-Net, Type-Defect

@gissuebot
Copy link
Author

Original comment posted by cgdecker@google.com on 2014-09-11 at 03:40 PM


Issue #1844 has been merged into this issue.

@cpovirk
Copy link
Member

cpovirk commented Jan 14, 2021

This is probably the same as #2587, which was fixed. Let us know if not.

@cpovirk cpovirk closed this as completed Jan 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants