This project is read-only.


Issue in determination of local guest IP address


User ClintAu has contacted you through CodePlex using the Contact User form.
Replying to this email will reply directly to the user. If you do not
wish to allow being contacted, you may indicate so on your profile page.
The following is the message from ClintAu:
Hi, at around line 822 in DroneController.cs, there is a bug.
Currently it is:
 LocalIPAddress = wlanInterface.NetworkInterface.GetIPProperties().UnicastAddresses[1].Address.ToString();
However this fails (index out of range) if only a single unicast address is returned. I'm not sure under what circumstances multiple unicast addresses would be returned - but the logic should take into account the actual number of returned unicast addresses.
Here's a fix:
System.Net.NetworkInformation.IPInterfaceProperties props = wlanInterface.NetworkInterface.GetIPProperties();
LocalIPAddress = props.UnicastAddresses[props.UnicastAddresses.Count-1].Address.ToString();


wjansoone wrote Dec 25, 2010 at 11:26 AM

This issue has been taken care of by using the proposed code of the initiator of the issue. The correction is kind of empirical as it is not really clear in which circumstances multiple unicats addresses are to be found on the network interface.

wrote Feb 14, 2013 at 2:33 AM

wrote May 16, 2013 at 5:09 AM

wrote May 16, 2013 at 5:09 AM

wrote Jun 14, 2013 at 9:00 AM