Details
Description
QUdpSocket::writeDiagram, results in a NetworkError when using IPv6 link-local addressing (e.g. ff02::1) on Mac OS X.
The specified scope id is definitely correct, and the source code works fine under Windows.
And it only occurs when no dynamically allocated IPv6 address is set to the interface.
Testcase:
QByteArray datagram = "Broadcast message";
QUdpSocket socket (this);
QHostAddress addr ("ff02::1");
addr.setScopeId ("4"); // Scope id 4 is en0 under this systemif (socket.writeDatagram (datagram, addr, 4545) < 0)
{
qDebug () << "Errno: " << socket.error();
qDebug () << "Errmgs: " << socket.errorString();
}
output:
Errno: QAbstractSocket::NetworkError
Errmgs: "Unable to send a message"
Attachments
Issue Links
- relates to
-
QTBUG-26248 QUdpSocket::readDatagram doesn't set scopeId of senders IPv6 address
-
- Closed
-