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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.8.x, 5.0.0
    • 4.6.1, 4.7.4, 4.8.1
    • Network
    • None
    • Macbook Pro 15 inch - version 5.4
      Mac OSX - Snow Leopard
      Mac OS X - 10.7.3
    • macOS

    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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              shkearns Shane Kearns
              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