An odd IPv6 application issue
George Bonser
gbonser at seven.com
Sat Dec 11 21:07:33 CET 2010
>
> 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)
Well, maybe. If the name used has ONLY and IPv6 address in /etc/hosts,
then it works fine. If the name has both an IPv4 and an IPv6 address,
it uses the mapped v4 address rather than the v6. I suppose I can work
around it with iproute2 and make a rule that applies to anything from
::ffff:10.1.2.3 that uses an alternative routing table and the route
entry in that table can then explicitly set the source IP but I think I
would need a separate table for each possible source which will be a
real pain in the rear to maintain (but I can script it on startup if I
have to).
Before I go too far down that road, I am going to attempt to put a more
modern kernel on the box and see if the behavior changes.
More information about the ipv6-ops
mailing list