Continue to blacklist the utun interfaces on macOS
There were two more places that blacklisted certain interface types that
commit e579c822c5
didn't catch. This
commit adds those two.
Task-number: QTBUG-61263
Change-Id: Ia58d0480a9169f0f121aec03bf2e8900a58939cd
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
This commit is contained in:
parent
5f0ce2333f
commit
74111ce590
@ -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)) {
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user