summaryrefslogtreecommitdiffstats
path: root/src/network/kernel
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2016-09-21 19:06:53 -0700
committerThiago Macieira <thiago.macieira@intel.com>2016-09-24 05:56:53 +0000
commit456ae0dfeb7f537266995c66b180cddf0c587743 (patch)
treea3b1a9fdbe047e88917dd383889ed0d8584101c3 /src/network/kernel
parentd95cb94baa6302bea6ad57a9690453e9b618421e (diff)
QNetworkInterface: fix reporting of virtual interfaces on Linux
We checked if we had seen the interface by looking into seenInterfaces and seenIndexes, but we never updated those variables with what we saw in this block. This fixes the reporting of PPP interfaces as well as TUN/TAP virtual interfaces. Change-Id: I33dc971f005a4848bb8ffffd1476830b8482b808 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/network/kernel')
-rw-r--r--src/network/kernel/qnetworkinterface_unix.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/network/kernel/qnetworkinterface_unix.cpp b/src/network/kernel/qnetworkinterface_unix.cpp
index eb73a2fb18..8ae36b56c2 100644
--- a/src/network/kernel/qnetworkinterface_unix.cpp
+++ b/src/network/kernel/qnetworkinterface_unix.cpp
@@ -352,6 +352,9 @@ static QList<QNetworkInterfacePrivate *> createInterfaces(ifaddrs *rawList)
if (seenIndexes.contains(ifindex))
continue;
+ seenInterfaces.insert(name);
+ seenIndexes.append(ifindex);
+
QNetworkInterfacePrivate *iface = new QNetworkInterfacePrivate;
interfaces << iface;
iface->name = name;