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

ReadDatagram create a QHostAddress incorrect

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.6.0
    • Network
    • None

    Description

      On a reception of an UDP broadcast from an ipv4 address (192.168.0.1). The QHostAddress retrieve by socket->readDatagram() has some field that are wrong.

      QHostAddress::toString() create a string "::ffff:192.168.0.1" because QHostAddress::protocol() return QAbstractSocket::IPv6Protocol.
      And in the Qt source there are a piece of code that create this weird ip address string because it detect it is an ipv4 address but the QHostAddress say that is an ipv6 address.

      On a 5.3 Qt version, the protocol is correctly set to IPv4Protocol and the toString function generate 192.168.0.1. I'm not sure when this bug appears but it was between the 5.3 and the 5.6 version.

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            schoumi Anthony Chomienne
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes