* Fixes [irritating] edge case in Util.GetLocalHost which could return an IPv6 address if no non-loopback IPv4 address can be found.

* Restores internal IPv6 support to NetworkUtil.*
* Fixes bad login unit tests.
This commit is contained in:
Adam Frisby
2009-05-23 07:51:29 +00:00
parent 6fe55a7ff8
commit 70f6a2852e
3 changed files with 47 additions and 15 deletions

View File

@@ -546,7 +546,15 @@ namespace OpenSim.Framework
}
if (hosts.Length > 0)
{
foreach (IPAddress host in hosts)
{
if(host.AddressFamily == AddressFamily.InterNetwork)
return host;
}
// Well all else failed...
return hosts[0];
}
return null;
}