mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 01:35:46 +08:00
Finalized the client's TCP IP address verification process for HG1.5.
This commit is contained in:
@@ -329,7 +329,7 @@ namespace OpenSim.Services.LLLoginService
|
||||
// Instantiate/get the simulation interface and launch an agent at the destination
|
||||
//
|
||||
string reason = string.Empty;
|
||||
AgentCircuitData aCircuit = LaunchAgentAtGrid(gatekeeper, destination, account, avatar, session, secureSession, position, where, clientVersion, out where, out reason);
|
||||
AgentCircuitData aCircuit = LaunchAgentAtGrid(gatekeeper, destination, account, avatar, session, secureSession, position, where, clientVersion, clientIP, out where, out reason);
|
||||
|
||||
if (aCircuit == null)
|
||||
{
|
||||
@@ -589,7 +589,7 @@ namespace OpenSim.Services.LLLoginService
|
||||
}
|
||||
|
||||
protected AgentCircuitData LaunchAgentAtGrid(GridRegion gatekeeper, GridRegion destination, UserAccount account, AvatarData avatar,
|
||||
UUID session, UUID secureSession, Vector3 position, string currentWhere, string viewer, out string where, out string reason)
|
||||
UUID session, UUID secureSession, Vector3 position, string currentWhere, string viewer, IPEndPoint clientIP, out string where, out string reason)
|
||||
{
|
||||
where = currentWhere;
|
||||
ISimulationService simConnector = null;
|
||||
@@ -655,7 +655,7 @@ namespace OpenSim.Services.LLLoginService
|
||||
{
|
||||
circuitCode = (uint)Util.RandomClass.Next(); ;
|
||||
aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position, viewer);
|
||||
success = LaunchAgentIndirectly(gatekeeper, destination, aCircuit, out reason);
|
||||
success = LaunchAgentIndirectly(gatekeeper, destination, aCircuit, clientIP, out reason);
|
||||
if (!success && m_GridService != null)
|
||||
{
|
||||
// Try the fallback regions
|
||||
@@ -664,7 +664,7 @@ namespace OpenSim.Services.LLLoginService
|
||||
{
|
||||
foreach (GridRegion r in fallbacks)
|
||||
{
|
||||
success = LaunchAgentIndirectly(gatekeeper, r, aCircuit, out reason);
|
||||
success = LaunchAgentIndirectly(gatekeeper, r, aCircuit, clientIP, out reason);
|
||||
if (success)
|
||||
{
|
||||
where = "safe";
|
||||
@@ -741,10 +741,15 @@ namespace OpenSim.Services.LLLoginService
|
||||
return simConnector.CreateAgent(region, aCircuit, (int)Constants.TeleportFlags.ViaLogin, out reason);
|
||||
}
|
||||
|
||||
private bool LaunchAgentIndirectly(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, out string reason)
|
||||
private bool LaunchAgentIndirectly(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, IPEndPoint clientIP, out string reason)
|
||||
{
|
||||
m_log.Debug("[LLOGIN SERVICE] Launching agent at " + destination.RegionName);
|
||||
return m_UserAgentService.LoginAgentToGrid(aCircuit, gatekeeper, destination, out reason);
|
||||
if (m_UserAgentService.LoginAgentToGrid(aCircuit, gatekeeper, destination, out reason))
|
||||
{
|
||||
m_UserAgentService.SetClientToken(aCircuit.SessionID, clientIP.Address.ToString());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
#region Console Commands
|
||||
|
||||
Reference in New Issue
Block a user