I got it... In fact, I just learned that it's not possible to listen on both IPv4 and IPv6 with the same socket, and that QHostAddress::Any means only IPv4
Qt automatically uses the IPv6 when the DNS lookup returns both IPv4 and IPv6, which caused the issue. How is it done usually in server applications? Are there always two QTcpServers , one for IPv4 and one for IPv6? Thanks, Etienne > Date: Fri, 22 Mar 2013 08:24:42 -0700 > From: Thiago Macieira <thiago.macie...@intel.com> > Subject: Re: [Interest] IPV6 not working > To: interest@qt-project.org > Message-ID: <5957727.VX6bVlzxxW@tjmaciei-mobl2> > Content-Type: text/plain; charset="iso-8859-1" > > On sexta-feira, 22 de mar?o de 2013 14.57.23, Etienne Sandr?-Chardonnal wrote: >> Dear all, >> >> I'm working on a networked application, intended for use on local area >> networks. So far it works fine using IPV4 addresses for connecting. >> >> I recently tried passing a host name instead of IP address to >> connectToHost(), this failed. After more investigation, the lookup >> gives an IPV6 address first, and if I give this IPV6 address to >> connectToHost(), it fails with a timeout error. >> >> Pinging the IPV6 address works, so I believe the OS/network is not in cause? > > Can you connect to the port in question on this IPv6 address? It might be a > firewall or routing issue that affects TCP but not ICMPv6. > > Can you run a packet capture application while your application is trying to > connect? Can you see the TCP SYN packets being sent? Do you see replies? _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest