HttpURLConnection with IPv6 link-local address
Bruno Harbulot
bruno at distributedmatter.net
Fri Oct 25 16:01:59 PDT 2013
Yes, the use-case I had in mind is indeed for automatic configuration, to
be able to communicate with a machine connected via ethernet without
necessarily knowing its current IP configuration (and without requiring a
DHCP server which it may or may not be configured to use). Unlike
link-local IPv4 addresses allocated via IPv4LL, there is always a
link-local IPv6 address (IPv4LL addresses are removed as soon as a "proper"
IPv4 address is configured on the same NIC, even if it's on an alias
interface on Linux, for example). When this is combined with a discovery
mechanism like mDNS, it's possible to find out the remote machine's
link-local IP address.
Having all this, it's possible to communicate with an HTTP server running
on the remote machine without any manual configuration, whether or not the
machine is correctly configured for your LAN.
Best wishes,
Bruno.
On Fri, Oct 25, 2013 at 10:36 PM, Bernd Eckenfels
<bernd-2013 at eckenfels.net>wrote:
> Am 25.10.2013, 16:44 Uhr, schrieb Chris Hegarty <chris.hegarty at oracle.com
> >:
>
> Wow, I've been working in this area for more than a decade, and this is
>> the first bug I've seen on the HttpURLConnection when using URL's with
>> literal IPv6 addresses.
>>
>
> I guess the interface identifier is just so inherently system specific
> that it most often not make sense to be used in URLs. But there is I guess
> one exception where it is used for local network stuff related to
> Plug&Play, Zeroconf and other home-stuff.
>
>
> We just past ZBB [1] for JDK8, so I'm not sure that a fix for this issue
>> will make JDK8 FCS, but I would suspect that the changes would be suitable
>> for an Update release, 7uXX or 8uXX for example.
>>
>
> I guess it especially would be helpfull if there is an actual commonly
> used usecase. Thats why I am wondering whats the motivation for the
> reporter.
>
> Gruss
> Bernd
> --
> http://bernd.eckenfels.net
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/net-dev/attachments/20131026/5afc8e9f/attachment.html
More information about the net-dev
mailing list