all kde network applications are resolving and connecting to the ipv6 address for localhost, ::1, before the ipv4 address, 127.0.0.1. This causes issues with some applications that listen on *:port, which by default opens a socket on the ipv6 interface even though those applications may have issues parsing ipv6 addresses, and thus don't support the connection on that address. It seems that the order has changed in a recent patch to 3.5.7, is this configurable? This seems to have begun after upgrading from 3.5.7 to 3.5.7_r2 Reproducible: Always Steps to Reproduce: 1. Connect to a local server of any type from any KDE application (Kmail, Konqueror, etc...) 2. Check with netstat or some other tool to notice the connection uses the ipv6 address instead of ipv4 when using the name 'localhost' 3. This does NOT occur if you do the same test from the command line using telnet or some other application. KDE should be respecting the naming difference between localhost and ip6-localhost Actual Results: kde applications connect to the ipv6 localhost address Expected Results: should first connect to the ipv4 address, and only that since there is no direct mapping in /etc/hosts for localhost to ipv6 ::1 Work around is to specify 127.0.0.1 instead of localhost. Or use non-kde applications like Firefox instead in areas where local ipv6 is not acceptable.
Please attach your /etc/hosts file - you can remove any entries for hosts on your network, but leave the localhost and ipv6 entries in the correct order.
Created attachment 126863 [details] fairly straight forward hosts file
I replaced some internal names with *** but left the fields in tact. I don't believe this is an issue with my hosts file, this is basically a boiler plate version. Again, it's only KDE network applications that are doing this, no other apps, i.e. telnet, firefox, etc.
Also, I tested this without any of the ipv6 entries in my hosts file with the same results.
Is this still happening with current kde version?
I'm closing this one as we haven't got any feedback about it. Anyone wanting to reopen this bug, please take a look at /etc/gai.conf as it allows ot configure the precedence for getaddrinfo