An odd IPv6 application issue

S.P.Zeidler spz at
Sat Dec 11 10:10:13 CET 2010

Thus wrote George Bonser (gbonser at

> So lets say I have:
> 2620:0:5103:1234::3
> 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
> ""
> When it does so, it sources traffic from ::ffff:  rather than
> 2620:0:5103:1234::3

That is an Java-ism currently also under discussion at
bsd-port-dev at 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.

spz at (S.P.Zeidler)

More information about the ipv6-ops mailing list