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

Wrong IPv4 address reported by QNetworkConfiguration

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.11.0 Beta 4
    • 5.11.0 Beta 2
    • Network
    • None
    • Gentoo Linux, amd64

      tun0 is created by OpenVPN 2.4.5
    • 411a4cb67cd3d976ddbd94b37a0ce936bfb223e5

    Description

      QNetworkConfiguration contains wrong IP address. Here is debug dump of QNetworkConfiguration:

       (QNetworkInterface(name = "lo", hardware address = "00:00:00:00:00:00", flags = IsUp IsRunning IsLoopBack , entries = ((address = QHostAddress("127.0.0.1"), netmask = QHostAddress("255.0.0.0"), broadcast = QHostAddress("127.255.255.255")), (address = QHostAddress("::1"), netmask = QHostAddress("ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"))))
       , QNetworkInterface(name = "eth0", hardware address = "xxx", flags = CanBroadcast CanMulticast , entries = ())
       , QNetworkInterface(name = "wlan0", hardware address = "xxx", flags = IsUp IsRunning CanBroadcast CanMulticast , entries = ((address = QHostAddress("10.18.207.106"), netmask = QHostAddress("255.255.252.0"), broadcast = QHostAddress("10.18.207.255")), (address = QHostAddress("xxx"), netmask = QHostAddress("ffff:ffff:ffff:ffff::"))))
       , QNetworkInterface(name = "vpn0", hardware address = "", flags = IsPointToPoint CanMulticast , entries = ())
       , QNetworkInterface(name = "tun0", hardware address = "", flags = IsUp IsRunning IsPointToPoint CanMulticast , entries = ((address = QHostAddress("10.9.0.9"), netmask = QHostAddress("255.255.255.255"), broadcast = QHostAddress("10.9.0.10")), (address = QHostAddress("xxx"), netmask = QHostAddress("ffff:ffff:ffff:ffff::"))))
       )
      

      and here is output of $ ip -4 addr show dev tun0

       17: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 100
       inet 10.9.0.10 peer 10.9.0.9/32 brd 10.9.0.10 scope global noprefixroute tun0
       valid_lft forever preferred_lft forever
      

      Qt reports 10.9.0.9 for tun0, while the true address is 10.9.0.10

      Attachments

        1. qtnetwork-ptp.patch
          0.9 kB
          Eugene Shalygin
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            thiago Thiago Macieira
            eugeneshalygin Eugene Shalygin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes