RFR(xs): 6991580: IPv6 Nameservers in resolv.conf throws NumberFormatException
Andrew Hughes
gnu.andrew at redhat.com
Mon Apr 20 16:24:24 UTC 2015
----- Original Message -----
> 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
> >
>
>
>
>
It'd be better to provide public nameservers in the test comment so everyone
is able to run this test if they update /etc/resolv.conf appropriately.
Google provides some: https://developers.google.com/speed/public-dns/docs/using
$ host redhat.com 2001:4860:4860::8888
Using domain server:
Name: 2001:4860:4860::8888
Address: 2001:4860:4860::8888#53
Aliases:
redhat.com has address 209.132.183.105
--
Andrew :)
Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
PGP Key: ed25519/35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04 C5A0 CFDA 0F9B 3596 4222
PGP Key: rsa4096/248BDC07 (hkp://keys.gnupg.net)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07
More information about the core-libs-dev
mailing list