Search Issue Tracker

Fixed in 5.4.0

Votes

2

Found in

5.2.1p3

Issue ID

740910

Regression

No

SocketException is thrown when creating a Socket with IPv6 AddressFamily.InterNetworkV6

Networking

-

Steps to reproduce:

1. Open attached project
2. Open scene "repro"
3. Run it
4. Notice SocketException in console:
SocketException: An address incompatible with the requested protocol was used.
System.Net.Sockets.Socket..ctor (AddressFamily family, SocketType type, ProtocolType proto)
SocketIPv6Test.Start () (at Assets/SocketIPv6Test.cs:11)

This isn't reproducible on Mac.

Note1: This exception happens only in Unity. Compiling this code outside of Unity and running it doesn't throw SocketException.

Note2: Multiple machine.config files have Ipv6 set to false. However, setting this option to true doesn't solve this issue. These configs are located in:
Editor\Data\Mono\etc\mono\2.0
Editor\Data\Mono\etc\mono\1.0
Editor\Data\MonoBleedingEdge\etc\mono\2.0
Editor\Data\MonoBleedingEdge\etc\mono\4.0
Editor\Data\MonoBleedingEdge\etc\mono\4.5

Comments (1)

  1. cxode

    Jan 29, 2021 12:53

    This is fixed for TCP and UDP sockets, but the issue persists for ICMP sockets. (Case 1309061)

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.