From 8ab7d80b093de2e2ed71737e0138b7a7c2c92f99 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 30 Jul 2010 14:04:13 -0700 Subject: 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. --- OpenSim/Services/HypergridService/UserAgentService.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'OpenSim/Services/HypergridService/UserAgentService.cs') diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index 2f1fed4..aec82e8 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs @@ -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; -- cgit v1.1