diff options
Diffstat (limited to 'src/network/kernel/qnetworkinterface_unix.cpp')
-rw-r--r-- | src/network/kernel/qnetworkinterface_unix.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/network/kernel/qnetworkinterface_unix.cpp b/src/network/kernel/qnetworkinterface_unix.cpp index d928a16..6c2a08a 100644 --- a/src/network/kernel/qnetworkinterface_unix.cpp +++ b/src/network/kernel/qnetworkinterface_unix.cpp @@ -266,18 +266,18 @@ static QList<QNetworkInterfacePrivate *> interfaceListing() } } - // Get the interface netmask - if (qt_safe_ioctl(socket, SIOCGIFNETMASK, &req) >= 0) { - sockaddr *sa = &req.ifr_addr; - entry.setNetmask(addressFromSockaddr(sa)); - } - // Get the address of the interface if (qt_safe_ioctl(socket, SIOCGIFADDR, &req) >= 0) { sockaddr *sa = &req.ifr_addr; entry.setIp(addressFromSockaddr(sa)); } + // Get the interface netmask + if (qt_safe_ioctl(socket, SIOCGIFNETMASK, &req) >= 0) { + sockaddr *sa = &req.ifr_addr; + entry.setNetmask(addressFromSockaddr(sa)); + } + iface->addressEntries << entry; } |