An odd IPv6 application issue
S.P.Zeidler
spz at serpens.de
Sat Dec 11 10:10:13 CET 2010
Thus wrote George Bonser (gbonser at seven.com):
> So lets say I have:
>
> 10.1.2.3 host-a.mydomain.com
> 2620:0:5103:1234::3 host-a.mydomain.com
>
> So I have this little java application and tell it to connect to a
> remote host that has only an IPv6 address. I tell it to bind to
> "host-a.mydomain.com"
>
> When it does so, it sources traffic from ::ffff:10.1.2.3 rather than
> 2620:0:5103:1234::3
That is an Java-ism currently also under discussion at
bsd-port-dev at openjdk.java.net. The thing is that the Java app does not
open a socket for v4 and a socket for v6, it opens -one- socket for both,
and the only way to do that is use the v6-mapped v4 address for v6.
It does that also when the address to bind to is localhost, which
Breaks Things Quite Horribly. The practical work-around is to run
the Java app on a port of localhost, v4 only, and have a reverse proxy
bring networking sanity to it. In the longer run, at least OpenJDK may
get better.
regards,
spz
--
spz at serpens.de (S.P.Zeidler)
More information about the ipv6-ops
mailing list