RFR(xs): 6991580: IPv6 Nameservers in resolv.conf throws NumberFormatException

Severin Gehwolf sgehwolf at redhat.com
Mon Apr 20 12:14:46 UTC 2015


Adding in net-dev.

On Mon, 2015-04-20 at 14:02 +0200, Severin Gehwolf wrote:
> Hi,
> 
> Could I please get a review and a sponsor for the following patch?
> 
> The issue is that JDK's internal /etc/resolv.conf nameserver parsing
> does not properly account for IPv6 addresses on Linux/Unix. While the
> code in com.sun.jndi.dns.DnsClient seems to support IPv6 addresses
> passed in via the servers list in the constructor it expects IPv6
> addresses to be wrapped in '[' and ']' respectively. However,
> sun.net.dns.ResolverConfigurationImpl does no wrapping of IPv6 addresses
> when parsing "nameserver" keywords from /etc/resolv.conf, thus breaking
> DnsClient's contract.
> 
> The fix is to properly wrap IPv6 literal addresses in '[' and ']' if not
> already wrapped.
> 
> Bug: https://bugs.openjdk.java.net/browse/JDK-6991580
> Webrev:
> http://cr.openjdk.java.net/~sgehwolf/webrevs/JDK-6991580/webrev.01/
> 
> Testing done: Added regression test fails for unpatched 9 and passes for
> patched 9.
> 
> Thanks,
> Severin
> 






More information about the core-libs-dev mailing list