You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ITerminalServicesSession.ClientIPAddress should be able to return an IPAddress
when the underlying WinAPI function returns an IPv6 address.
Given that the IN6_ADDR structure via
http://msdn.microsoft.com/en-us/library/ff554787%28v=VS.85%29.aspx is just a
16-byte array, you can see that it's a simple modification. I believe this code
would be sufficient to support this scenario and it works in my limited test
case. (source: Impl\TerminalServicesSession.cs, function GetClientIPAddress,
where the TODO comment is for this issue)
if (addressFamily == AddressFamily.InterNetwork)
{
byte[] address = new byte[4];
Array.Copy(clientAddress.Address, 2, address, 0, 4);
return new IPAddress(address);
} else if(addressFamily == AddressFamily.InterNetworkV6) {
byte[] address = new byte[16];
Array.Copy(clientAddress.Address, 2, address, 0, 16);
return new IPAddress(address);
}
Original issue reported on code.google.com by dan.libe...@gmail.com on 20 Dec 2010 at 11:47
The text was updated successfully, but these errors were encountered:
Dan,
You're right that this would be a pretty simple modification -- the only other
place that would need to be changed would be
NativeMethodsHelper.QuerySessionInformationForEndPoint (admittedly not very
DRY). The only reason I hadn't done it is that I hadn't set up IPv6 on a
network yet for testing (see issue 17). But if it works for you, I'll apply the
patch.
Original comment by danports on 21 Dec 2010 at 1:48
I committed a fix for this in r111. Can you download the latest build from the
build server
(http://teamcity.codebetter.com/viewLog.html?buildId=25024&tab=artifacts&buildTy
peId=bt95 -- login as a guest) and verify that
ITerminalServicesSession.ClientIPAddress and
ITerminalServicesSession.RemoteEndPoint report the correct IPv6 results in your
environment? Thanks.
Original comment by danports on 26 Apr 2011 at 10:56
Original issue reported on code.google.com by
dan.libe...@gmail.com
on 20 Dec 2010 at 11:47The text was updated successfully, but these errors were encountered: