mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 11:57:03 +08:00
* 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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user