* Disables internal IPv6 Support - causing issues.

0.6.6-post-fixes
Adam Frisby 2009-05-23 07:29:14 +00:00
parent bb363d9aa4
commit 6fe55a7ff8
1 changed files with 11 additions and 3 deletions

View File

@ -57,6 +57,9 @@ namespace OpenSim.Framework
} }
} }
if (subnet.Key.AddressFamily != AddressFamily.InterNetwork)
valid = false;
if (valid) if (valid)
{ {
m_log.Info("[NATROUTING] Local LAN user detected, sending them '" + subnet.Key + "' instead of '" + simulator + "'"); m_log.Info("[NATROUTING] Local LAN user detected, sending them '" + subnet.Key + "' instead of '" + simulator + "'");
@ -70,8 +73,9 @@ namespace OpenSim.Framework
private static IPAddress GetExternalIPFor(IPAddress destination, string defaultHostname) private static IPAddress GetExternalIPFor(IPAddress destination, string defaultHostname)
{ {
bool ipv6 = false;
// Adds IPv6 Support (Not that any of the major protocols supports it...) // Adds IPv6 Support (Not that any of the major protocols supports it...)
if (destination.AddressFamily == AddressFamily.InterNetworkV6) if (ipv6 && destination.AddressFamily == AddressFamily.InterNetworkV6)
{ {
foreach (IPAddress host in Dns.GetHostAddresses(defaultHostname)) foreach (IPAddress host in Dns.GetHostAddresses(defaultHostname))
{ {
@ -89,7 +93,7 @@ namespace OpenSim.Framework
// Check if we're accessing localhost. // Check if we're accessing localhost.
foreach (IPAddress host in Dns.GetHostAddresses(Dns.GetHostName())) foreach (IPAddress host in Dns.GetHostAddresses(Dns.GetHostName()))
{ {
if (host.Equals(destination)) if (host.Equals(destination) && host.AddressFamily == AddressFamily.InterNetwork)
return destination; return destination;
} }
@ -114,6 +118,9 @@ namespace OpenSim.Framework
} }
} }
if (subnet.Key.AddressFamily != AddressFamily.InterNetwork)
valid = false;
if (valid) if (valid)
{ {
m_log.Info("[NATROUTING] Local LAN user detected, sending them '" + subnet.Key + "' instead of '" + defaultHostname + "'"); m_log.Info("[NATROUTING] Local LAN user detected, sending them '" + subnet.Key + "' instead of '" + defaultHostname + "'");
@ -143,7 +150,8 @@ namespace OpenSim.Framework
if (address.IPv4Mask != null) if (address.IPv4Mask != null)
{ {
m_subnets.Add(address.Address, address.IPv4Mask); m_subnets.Add(address.Address, address.IPv4Mask);
} else }
else
{ {
m_log.Warn("[NetworkUtil] Found IPv4 Address without Subnet Mask!?"); m_log.Warn("[NetworkUtil] Found IPv4 Address without Subnet Mask!?");
} }