[Interest] IPV6 not working

Etienne Sandré-Chardonnal etienne.sandre at m4x.org
Fri Mar 22 23:34:51 CET 2013


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.macieira at intel.com>
> Subject: Re: [Interest] IPV6 not working
> To: interest at qt-project.org
> Message-ID: <5957727.VX6bVlzxxW at 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?



More information about the Interest mailing list