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

Attempting to join an IPv4 multicast group after binding to QHostAddress::Any fails

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 5.0.0
    • 5.0.0
    • Network: Sockets
    • None
    • Iaf5bbee82e13ac92e11b60c558f5af9ce26f474b

    Description

      (note: this might also affect 4.8, I haven't checked)

      See the attached diff for a test. It fails, because QHostAddress::Any is treated as a v6 bind (since it's for both v4 and v6 interfaces), but the QHostAddress passed to joinMulticastGroup is a v4 address, so it tries to take the v4 path for setsocketopt, which then fails with EINVAL (at least on OS X).

      If I force it to take the v6 path, it succeeds, so I suspect we may need some additional logic to handle QHostAddress::Any binds by storing the address family, or something, but I need advice before I try handle this.

      Attachments

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

        Activity

          People

            w00t Robin Burchell
            w00t Robin Burchell
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes