summaryrefslogtreecommitdiffstats
path: root/tests/auto/network
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-06-06 07:51:42 -0700
committerThiago Macieira <thiago.macieira@intel.com>2017-06-06 22:53:04 +0000
commit74111ce590ec8b40ee48e828c238bbfb1bf41aaa (patch)
treed8e8da048beb4ad459d5840d1ac2a7614b66906c /tests/auto/network
parent5f0ce2333f7e11a3ffb5d16a27cd9303efa712d5 (diff)
Continue to blacklist the utun interfaces on macOS
There were two more places that blacklisted certain interface types that commit e579c822c5bedf5e626e4eb72db3b49a4a4015dc didn't catch. This commit adds those two. Task-number: QTBUG-61263 Change-Id: Ia58d0480a9169f0f121aec03bf2e8900a58939cd Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
Diffstat (limited to 'tests/auto/network')
-rw-r--r--tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp7
-rw-r--r--tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp7
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp
index cd1de209da..c4432c83ee 100644
--- a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp
+++ b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp
@@ -938,9 +938,16 @@ void tst_QTcpServer::linkLocal()
//Windows preallocates link local addresses to interfaces that are down.
//These may or may not work depending on network driver (they do not work for the Bluetooth PAN driver)
if (iface.flags() & QNetworkInterface::IsUp) {
+#if defined(Q_OS_WIN)
// Do not connect to the Teredo Tunneling interface on Windows Xp.
if (iface.humanReadableName() == QString("Teredo Tunneling Pseudo-Interface"))
continue;
+#elif defined(Q_OS_DARWIN)
+ // Do not add "utun" interfaces on macOS: nothing ever gets received
+ // (we don't know why)
+ if (iface.name().startsWith("utun"))
+ continue;
+#endif
foreach (QNetworkAddressEntry addressEntry, iface.addressEntries()) {
QHostAddress addr = addressEntry.ip();
if (addr.isInSubnet(localMaskv4, 16)) {
diff --git a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
index b476fdd334..43d0781083 100644
--- a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
+++ b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
@@ -1638,9 +1638,16 @@ void tst_QUdpSocket::linkLocalIPv4()
//Windows preallocates link local addresses to interfaces that are down.
//These may or may not work depending on network driver (they do not work for the Bluetooth PAN driver)
if (iface.flags() & QNetworkInterface::IsUp) {
+#if defined(Q_OS_WIN)
// Do not add the Teredo Tunneling Pseudo Interface on Windows.
if (iface.humanReadableName().contains("Teredo"))
continue;
+#elif defined(Q_OS_DARWIN)
+ // Do not add "utun" interfaces on macOS: nothing ever gets received
+ // (we don't know why)
+ if (iface.name().startsWith("utun"))
+ continue;
+#endif
foreach (QNetworkAddressEntry addr, iface.addressEntries()) {
if (addr.ip().isInSubnet(localMask, 16)) {
addresses << addr.ip();