-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
Socket.getaddrinfo returns wrong data when IPv6 is disabled and running on Java8 #4479
Comments
It's possible this is a JDK bug. getaddrinfo on both 1.7 and 9k simply uses Java networking APIs to get a list of addresses. If these addresses contain bogus information, it wouldn't be our fault. Alternatively, if they contain this information but with some indicator that it's not relevant (like tagged as IPv6 or something) we may need to filter it. Can you see what Java returns for a list of addresses? |
Indeed 😢
|
Java7 seems to do something sensible:
|
I got some extra eyes over here on the issue, we'll keep you posted. |
This ticket can be closed, the issue seems to be directly related to Java8 and nscd:
|
JFTR, this was the bug: https://bugzilla.redhat.com/show_bug.cgi?id=1324568 |
Common environment for all tests:
The issue is the following:
In other words, when IPv6 is totally disabled and jRuby is running on top of Java8, Socket.getaddrinfo returns addresses that don't belong to the name being queried. The behaviour is the same when trying to reproduce the problem with jRuby 9k:
I have no idea where 151.127.0.0 nor 18.127.0.0 are coming from, but all the wrong addresses that I've seen have the last two bytes zeroed as common denominator.
It works fine regardless of the Java version though when IPv6 is not disabled:
We're happy to provide more information if needed.
Thanks for looking into it!
The text was updated successfully, but these errors were encountered: