Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-25634

CLONE - QUdpSocket::writeDatagram, results in a NetworkError. when using link-local addressing (e.g. ff02::1) on Mac OS X

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 4.6.1, 4.7.4, 4.8.1
    • Fix Version/s: 4.8.x, 5.0.0
    • Component/s: Network
    • Labels:
      None
    • Environment:

      Macbook Pro 15 inch - version 5.4
      Mac OSX - Snow Leopard
      Mac OS X - 10.7.3

      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 system

      if (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

          For Gerrit Dashboard: QTBUG-25634
          # Subject Project Status CR V

            Activity

              People

              • Assignee:
                shkearns Shane Kearns
                Reporter:
                jyavenard Jean-Yves Avenard
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes