Changed the way HG client verification is done: now transforming local and LAN client IPs into external IPs. This addresses some issues related to running both the user agents service and the viewer in the same machine/LAN, which then presents a problem when the user agent goes to an external network.

This commit is contained in:
Diva Canto
2010-07-30 14:04:13 -07:00
parent b83910f12a
commit 8ab7d80b09
4 changed files with 84 additions and 9 deletions

View File

@@ -754,10 +754,8 @@ namespace OpenSim.Services.LLLoginService
m_log.Debug("[LLOGIN SERVICE] Launching agent at " + destination.RegionName);
if (m_UserAgentService.LoginAgentToGrid(aCircuit, gatekeeper, destination, out reason))
{
// We may need to do this at some point,
// so leaving it here in comments.
//IPAddress addr = NetworkUtil.GetIPFor(clientIP.Address, destination.ExternalEndPoint.Address);
m_UserAgentService.SetClientToken(aCircuit.SessionID, /*addr.Address.ToString() */ clientIP.Address.ToString());
IPAddress addr = NetworkUtil.GetExternalIPOf(clientIP.Address);
m_UserAgentService.SetClientToken(aCircuit.SessionID, addr.ToString() /* clientIP.Address.ToString() */);
return true;
}
return false;