mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
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:
@@ -63,6 +63,8 @@ namespace OpenSim.Services.HypergridService
|
||||
protected static IGridService m_GridService;
|
||||
protected static GatekeeperServiceConnector m_GatekeeperConnector;
|
||||
|
||||
protected static bool m_BypassClientVerification;
|
||||
|
||||
public UserAgentService(IConfigSource config)
|
||||
{
|
||||
if (!m_Initialized)
|
||||
@@ -76,6 +78,8 @@ namespace OpenSim.Services.HypergridService
|
||||
string gridService = serverConfig.GetString("GridService", String.Empty);
|
||||
string gridUserService = serverConfig.GetString("GridUserService", String.Empty);
|
||||
|
||||
m_BypassClientVerification = serverConfig.GetBoolean("BypassClientVerification", false);
|
||||
|
||||
if (gridService == string.Empty || gridUserService == string.Empty)
|
||||
throw new Exception(String.Format("Incomplete specifications, UserAgent Service cannot function."));
|
||||
|
||||
@@ -212,11 +216,10 @@ namespace OpenSim.Services.HypergridService
|
||||
|
||||
public bool VerifyClient(UUID sessionID, string token)
|
||||
{
|
||||
m_log.DebugFormat("[USER AGENT SERVICE]: Verifying Client session {0} with token {1}", sessionID, token);
|
||||
//return true;
|
||||
if (m_BypassClientVerification)
|
||||
return true;
|
||||
|
||||
// Commenting this for now until I understand better what part of a sender's
|
||||
// info stays unchanged throughout a session
|
||||
m_log.DebugFormat("[USER AGENT SERVICE]: Verifying Client session {0} with token {1}", sessionID, token);
|
||||
|
||||
if (m_TravelingAgents.ContainsKey(sessionID))
|
||||
return m_TravelingAgents[sessionID].ClientToken == token;
|
||||
|
||||
Reference in New Issue
Block a user