Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Baulig <mabaul@microsoft.com>2019-12-30 21:08:03 +0300
committerSteve Pfister <steveisok@users.noreply.github.com>2019-12-30 21:08:03 +0300
commit400fb9c2cb0a47948b27b78d154f91ac40e5491e (patch)
tree640fb72594c850f5fb62eb8c0a8e883a14e4e761 /mcs/class/System
parent61eb2be2e10c228c5915d90a90b52e7d410c0f25 (diff)
Socket.BeginMConnect() should not attempt connections on unsupported address families. (#18302)
Fixes #16513.
Diffstat (limited to 'mcs/class/System')
-rw-r--r--mcs/class/System/System.Net.Sockets/Socket.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/mcs/class/System/System.Net.Sockets/Socket.cs b/mcs/class/System/System.Net.Sockets/Socket.cs
index eec2572fd7f..f55cf33653c 100644
--- a/mcs/class/System/System.Net.Sockets/Socket.cs
+++ b/mcs/class/System/System.Net.Sockets/Socket.cs
@@ -1083,6 +1083,9 @@ namespace System.Net.Sockets
sockares.CurrentAddress++;
sockares.EndPoint = new IPEndPoint (sockares.Addresses [i], sockares.Port);
+ if (!sockares.socket.CanTryAddressFamily(sockares.EndPoint.AddressFamily))
+ continue;
+
return BeginSConnect (sockares);
} catch (Exception e) {
exc = e;