Issue 39 in cassia: IPv6 support

1 view
Skip to first unread message

cas...@googlecode.com

unread,
Dec 20, 2010, 6:47:37 PM12/20/10
to cassi...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 39 by dan.liberatore: IPv6 support
http://code.google.com/p/cassia/issues/detail?id=39

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);
}


cas...@googlecode.com

unread,
Dec 20, 2010, 8:48:09 PM12/20/10
to cassi...@googlegroups.com
Updates:
Status: Accepted
Owner: danports
Labels: -Type-Defect Type-Enhancement Milestone-2.1

Comment #1 on issue 39 by danports: IPv6 support
http://code.google.com/p/cassia/issues/detail?id=39

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.

cas...@googlecode.com

unread,
Apr 26, 2011, 6:56:55 PM4/26/11
to cassi...@googlegroups.com
Updates:
Status: Fixed

Comment #2 on issue 39 by danpo...@gmail.com: IPv6 support
http://code.google.com/p/cassia/issues/detail?id=39

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&buildTypeId=bt95
-- login as a guest) and verify that
ITerminalServicesSession.ClientIPAddress and
ITerminalServicesSession.RemoteEndPoint report the correct IPv6 results in
your environment? Thanks.

cas...@googlecode.com

unread,
Feb 14, 2012, 11:50:15 PM2/14/12
to cassi...@googlegroups.com

Comment #3 on issue 39 by danports: IPv6 support
http://code.google.com/p/cassia/issues/detail?id=39

Issue 17 has been merged into this issue.

Reply all
Reply to author
Forward
0 new messages