[josm-dev] IPv6 problems

Dirk Stöcker openstreetmap at dstoecker.de
Fri Jan 1 21:43:42 UTC 2016


On Fri, 1 Jan 2016, Philip Homburg wrote:

> It is really simple. An application should do nothing more than trying each
> address in turn in the order returned by getaddrinfo. Either connect(2)
> succeeds and you are done or there is a failure and you try the next address.

That does cause large timeouts in todays internet where packets are often 
dropped and not rejected. This is no option for JOSM in that easy 
configuration. To get it working an implementation must be more complex.

> Trying only one address has been bad practice since before IPv6 was even
> invented.

I disagree.

> Of course, tweaking /etc/gai.conf to prefer IPv4 over IPv6 is also an option.
> (Assuming java uses getaddrinfo under the hood)

Sadly Java does not follow this, but only has an option to say in advance 
whether IPv6 or IPv4 addresses should be preferred. And then it follows 
that rule ignoring the OS and the fact whether it works or not. And you 
cannot change this without a restart of the tool.

Ciao
-- 
http://www.dstoecker.eu/ (PGP key available)



More information about the josm-dev mailing list