Ignore disconnected interfaces in HttpListenerRequestTest.HttpRequestIsLocal
[mono.git] / mcs / class / System / Test / System.Net / HttpListenerRequestTest.cs
index d782103f33e33709321e1c7f2211d2b4fccf8a90..18dedcae32dbe27dbc0f7863ae84c0b22c0b7130 100644 (file)
@@ -211,6 +211,8 @@ namespace MonoTests.System.Net
                        var ips = new List<IPAddress> ();
                        ips.Add (IPAddress.Loopback);
                        foreach (var adapter in NetworkInterface.GetAllNetworkInterfaces ()) {
+                               if (adapter.OperationalStatus != OperationalStatus.Up)
+                                       continue;
                                foreach (var ip in adapter.GetIPProperties ().UnicastAddresses) {
                                        ips.Add (ip.Address);
                                }