From 36e5e50d854245ad153bb7ca285c516b5988a0fd Mon Sep 17 00:00:00 2001 From: Garry Newman Date: Mon, 2 Mar 2020 10:03:38 +0000 Subject: [PATCH] Fixed ConnectionInfo.Identity returning wrong thing --- Facepunch.Steamworks/Networking/ConnectionInfo.cs | 2 +- Facepunch.Steamworks/Networking/NetAddress.cs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Facepunch.Steamworks/Networking/ConnectionInfo.cs b/Facepunch.Steamworks/Networking/ConnectionInfo.cs index 49f7116..a8369d6 100644 --- a/Facepunch.Steamworks/Networking/ConnectionInfo.cs +++ b/Facepunch.Steamworks/Networking/ConnectionInfo.cs @@ -35,7 +35,7 @@ public struct ConnectionInfo /// /// Who is on the other end? Depending on the connection type and phase of the connection, we might not know /// - public NetIdentity Identity => address; + public NetIdentity Identity => identity; /// /// Basic cause of the connection termination or problem. diff --git a/Facepunch.Steamworks/Networking/NetAddress.cs b/Facepunch.Steamworks/Networking/NetAddress.cs index 6cc61ee..af17a3d 100644 --- a/Facepunch.Steamworks/Networking/NetAddress.cs +++ b/Facepunch.Steamworks/Networking/NetAddress.cs @@ -136,6 +136,11 @@ public IPAddress Address return Utility.Int32ToIp( ip ); } + if ( IsIPv6AllZeros ) + { + return IPAddress.IPv6Loopback; + } + throw new System.NotImplementedException( "Oops - no IPV6 support yet?" ); } }