You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the documentation you can prioritize IPv6 over IPv4 for hosts that have both A and AAAA DNS entries. This setting in turn sets the JAVA system property java.net.preferIPv6Addresses to true.
InetAddress.getByName(hostname) does return an IPv6 address for hosts with an A entry only. For hosts with both entries the IPv4 address is returned. The system property above does not have any effect in that case. Also refer to https://stackoverflow.com/a/11974740 which proposes to use InetAddress.getAllByName(hostname) or a 3rd party library.
According to the documentation you can prioritize IPv6 over IPv4 for hosts that have both A and AAAA DNS entries. This setting in turn sets the JAVA system property
java.net.preferIPv6Addresses
totrue
.InetAddress.getByName(hostname)
does return an IPv6 address for hosts with an A entry only. For hosts with both entries the IPv4 address is returned. The system property above does not have any effect in that case. Also refer to https://stackoverflow.com/a/11974740 which proposes to useInetAddress.getAllByName(hostname)
or a 3rd party library.Affected code in Resolver class.
The text was updated successfully, but these errors were encountered: