Public bug reported:

I installed KDE4 on Hardy and Gutsy backports today and noticed that no
application (kget, konqueror, ktorrent 3.0beta1 compiled by myself) did
connections through IPv6 by default. After spending some time in IRC I
found out that Qt4 reorders the results of getaddrinfo() in
src/network/qhostinfo_unix.cpp around line 160 and always prefers IPv4.

I have asked around why this was the case and got a few answers that
don't really make sense

a) IPv6 causes problems for people with broken resolvers that time out/SERVFAIL 
on AAAA queries
True, but the reordering does not fix this problem, as getaddrinfo() is called 
with AF_UNSPEC nevertheless. Quite some work has gone into Ubuntu libc6 to 
avoid AAAA queries at all if no global IPv6 address is configured, so this is 
no cause in Ubuntu

b) The "old default" sorting (IPv6 before IPv4) loaded the module automatically 
since it was trying to connect() to an AF_INET6 address first. 
True, but not an issue in Ubuntu due to the changes in libc6. Also, all Ubuntu 
boxes I had so far had IPv6 automatically loaded at boot. And the reordering 
only delays the autoloading until you hit the first dualstack node that is down 
and falls back to IPv6

c) Other issues might cause IPv6 to be considered usable when it is actually 
broken, timing out on connects.
True, but one should fix the root cause, not a symptom. After all the Qt4 
changes don't hit ssh, telnet, Mozilla applications, gnome applications and so 
on. In fact, different behaviour might confuse people even more.

d) IPv6 is probably slower due to being tunneled
Erm, I don't know where some people live, but we have 10GE pipes with native 
IPv6 here. And even if it was always slower, IPv6 is usually an opt-in game at 
the moment. 

The fix is easy, please change the addresses.prepend(addr) to
addresses.append(addr) in src/network/qhostinfo_unix.cpp:169. I've
reported the bug upstream at trolltech as well.

** Affects: qt4-x11 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
Qt4 always prefers IPv4 over IPv6
https://bugs.launchpad.net/bugs/182398
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to