Details
-
Bug
-
Resolution: Invalid
-
P4: Low
-
None
-
5.5.0
-
None
-
Windows 7, Qt 5.5, Mingw 4.9.2, Qt 5.6, OS X etc.
Description
QTcpServer server;
server.listen( QHostAddress::Any, portValue ); // The dual stack any-address
…
QTcpSocket socket;
socket.setSocketDescriptor( descriptorValue );
...
On IPv4 connection:
In Qt 5.4- socket.peerAddress() == QHostAddress( "192.168.13.13" ).
In Qt 5.5 socket.peerAddress() == QHostAddress( "::ffff:192.168.13.13" ).
Same for localhost connection 127.0.0.1 versus ::ffff:127.0.0.1.
Notes:
1) QHostAddress( "192.168.13.13" ) != QHostAddress( "::ffff:192.168.13.13" )
2) QHostInfo::lookupHost does not return QHostAddress( "::ffff:192.168.13.13" ) in the list so this change breaks code checking connection source for (as far as I see) no reason.
3) With server.listen( QHostAddress::AnyIPv4, portValue ) I get (as expected) normal IPv4 addresses.