From: Niklas Therning Date: Tue, 22 Nov 2016 19:03:22 +0000 (+0100) Subject: Merge pull request #4003 from ntherning/ignore-disconnected-interfaces-in-HttpListene... X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=22faa8733f4899d57064ba364b072648805bcee1;hp=6adffa4edd217ccde7147db2b49424b8c9e30943;p=mono.git Merge pull request #4003 from ntherning/ignore-disconnected-interfaces-in-HttpListenerRequestTest.HttpRequestIsLocal Ignore disconnected interfaces in HttpListenerRequestTest.HttpRequestIsLocal --- diff --git a/mcs/class/System/Test/System.Net/HttpListenerRequestTest.cs b/mcs/class/System/Test/System.Net/HttpListenerRequestTest.cs index d782103f33e..18dedcae32d 100644 --- a/mcs/class/System/Test/System.Net/HttpListenerRequestTest.cs +++ b/mcs/class/System/Test/System.Net/HttpListenerRequestTest.cs @@ -211,6 +211,8 @@ namespace MonoTests.System.Net var ips = new List (); 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); }