tst_qudpsocket: Interface fix for Windows Xp
On Windows Xp we can not connect to the pseudo interfaces used for Teredo, so do not add these to the tests. Change-Id: I4e20c880fa2d18f266ffcef2f640d8b2e6d0cd21 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
This commit is contained in:
parent
c6d7f9c1a0
commit
3101f9d92c
@ -1366,6 +1366,9 @@ void tst_QUdpSocket::linkLocalIPv6()
|
|||||||
//Windows preallocates link local addresses to interfaces that are down.
|
//Windows preallocates link local addresses to interfaces that are down.
|
||||||
//These may or may not work depending on network driver
|
//These may or may not work depending on network driver
|
||||||
if (iface.flags() & QNetworkInterface::IsUp) {
|
if (iface.flags() & QNetworkInterface::IsUp) {
|
||||||
|
// Do not add the Teredo Tunneling Pseudo Interface on Windows.
|
||||||
|
if (iface.humanReadableName().contains("Teredo"))
|
||||||
|
continue;
|
||||||
foreach (QNetworkAddressEntry addressEntry, iface.addressEntries()) {
|
foreach (QNetworkAddressEntry addressEntry, iface.addressEntries()) {
|
||||||
QHostAddress addr(addressEntry.ip());
|
QHostAddress addr(addressEntry.ip());
|
||||||
if (!addr.scopeId().isEmpty() && addr.isInSubnet(localMask, 64)) {
|
if (!addr.scopeId().isEmpty() && addr.isInSubnet(localMask, 64)) {
|
||||||
@ -1438,6 +1441,9 @@ void tst_QUdpSocket::linkLocalIPv4()
|
|||||||
//Windows preallocates link local addresses to interfaces that are down.
|
//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)
|
//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 (iface.flags() & QNetworkInterface::IsUp) {
|
||||||
|
// Do not add the Teredo Tunneling Pseudo Interface on Windows.
|
||||||
|
if (iface.humanReadableName().contains("Teredo"))
|
||||||
|
continue;
|
||||||
foreach (QNetworkAddressEntry addr, iface.addressEntries()) {
|
foreach (QNetworkAddressEntry addr, iface.addressEntries()) {
|
||||||
if (addr.ip().isInSubnet(localMask, 16)) {
|
if (addr.ip().isInSubnet(localMask, 16)) {
|
||||||
addresses << addr.ip();
|
addresses << addr.ip();
|
||||||
|
Loading…
Reference in New Issue
Block a user