I'm implementing an FTP server, and it doesn't support IPv6 yet (IPv6 connections can't use PORT and PASV, they need to use EPRT and EPSV instead for specifying data connections).
So I need to accept only IPv4 connections from my QTcpServer. Right now I start listening with this code:
server->listen(QHostAddress::Any, port);
QHostAddress::Any is supposed to be the IPv4 any-address, but Filezilla still manages to connect using IPv6 when I specify localhost instead of 127.0.0.1. I thought that QHostAddress::Any would mean only IPv4 incoming connections are accepted, but that's obviously not the case.
So how can I disable IPv6 connections?