diff options
author | Diva Canto | 2010-07-30 14:04:13 -0700 |
---|---|---|
committer | Diva Canto | 2010-07-30 14:04:13 -0700 |
commit | 8ab7d80b093de2e2ed71737e0138b7a7c2c92f99 (patch) | |
tree | 7036b62efbbf2d0cf7d98f37f4a18d53d95263d4 /OpenSim/Services | |
parent | * Added debug logging to SimianGrid inventory service response parsing (diff) | |
download | opensim-SC_OLD-8ab7d80b093de2e2ed71737e0138b7a7c2c92f99.zip opensim-SC_OLD-8ab7d80b093de2e2ed71737e0138b7a7c2c92f99.tar.gz opensim-SC_OLD-8ab7d80b093de2e2ed71737e0138b7a7c2c92f99.tar.bz2 opensim-SC_OLD-8ab7d80b093de2e2ed71737e0138b7a7c2c92f99.tar.xz |
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.
Diffstat (limited to 'OpenSim/Services')
-rw-r--r-- | OpenSim/Services/HypergridService/UserAgentService.cs | 11 | ||||
-rw-r--r-- | OpenSim/Services/LLLoginService/LLLoginService.cs | 6 |
2 files changed, 9 insertions, 8 deletions
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 | |||
63 | protected static IGridService m_GridService; | 63 | protected static IGridService m_GridService; |
64 | protected static GatekeeperServiceConnector m_GatekeeperConnector; | 64 | protected static GatekeeperServiceConnector m_GatekeeperConnector; |
65 | 65 | ||
66 | protected static bool m_BypassClientVerification; | ||
67 | |||
66 | public UserAgentService(IConfigSource config) | 68 | public UserAgentService(IConfigSource config) |
67 | { | 69 | { |
68 | if (!m_Initialized) | 70 | if (!m_Initialized) |
@@ -76,6 +78,8 @@ namespace OpenSim.Services.HypergridService | |||
76 | string gridService = serverConfig.GetString("GridService", String.Empty); | 78 | string gridService = serverConfig.GetString("GridService", String.Empty); |
77 | string gridUserService = serverConfig.GetString("GridUserService", String.Empty); | 79 | string gridUserService = serverConfig.GetString("GridUserService", String.Empty); |
78 | 80 | ||
81 | m_BypassClientVerification = serverConfig.GetBoolean("BypassClientVerification", false); | ||
82 | |||
79 | if (gridService == string.Empty || gridUserService == string.Empty) | 83 | if (gridService == string.Empty || gridUserService == string.Empty) |
80 | throw new Exception(String.Format("Incomplete specifications, UserAgent Service cannot function.")); | 84 | throw new Exception(String.Format("Incomplete specifications, UserAgent Service cannot function.")); |
81 | 85 | ||
@@ -212,11 +216,10 @@ namespace OpenSim.Services.HypergridService | |||
212 | 216 | ||
213 | public bool VerifyClient(UUID sessionID, string token) | 217 | public bool VerifyClient(UUID sessionID, string token) |
214 | { | 218 | { |
215 | m_log.DebugFormat("[USER AGENT SERVICE]: Verifying Client session {0} with token {1}", sessionID, token); | 219 | if (m_BypassClientVerification) |
216 | //return true; | 220 | return true; |
217 | 221 | ||
218 | // Commenting this for now until I understand better what part of a sender's | 222 | m_log.DebugFormat("[USER AGENT SERVICE]: Verifying Client session {0} with token {1}", sessionID, token); |
219 | // info stays unchanged throughout a session | ||
220 | 223 | ||
221 | if (m_TravelingAgents.ContainsKey(sessionID)) | 224 | if (m_TravelingAgents.ContainsKey(sessionID)) |
222 | return m_TravelingAgents[sessionID].ClientToken == token; | 225 | return m_TravelingAgents[sessionID].ClientToken == token; |
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index f4e045c..036bec6 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -754,10 +754,8 @@ namespace OpenSim.Services.LLLoginService | |||
754 | m_log.Debug("[LLOGIN SERVICE] Launching agent at " + destination.RegionName); | 754 | m_log.Debug("[LLOGIN SERVICE] Launching agent at " + destination.RegionName); |
755 | if (m_UserAgentService.LoginAgentToGrid(aCircuit, gatekeeper, destination, out reason)) | 755 | if (m_UserAgentService.LoginAgentToGrid(aCircuit, gatekeeper, destination, out reason)) |
756 | { | 756 | { |
757 | // We may need to do this at some point, | 757 | IPAddress addr = NetworkUtil.GetExternalIPOf(clientIP.Address); |
758 | // so leaving it here in comments. | 758 | m_UserAgentService.SetClientToken(aCircuit.SessionID, addr.ToString() /* clientIP.Address.ToString() */); |
759 | //IPAddress addr = NetworkUtil.GetIPFor(clientIP.Address, destination.ExternalEndPoint.Address); | ||
760 | m_UserAgentService.SetClientToken(aCircuit.SessionID, /*addr.Address.ToString() */ clientIP.Address.ToString()); | ||
761 | return true; | 759 | return true; |
762 | } | 760 | } |
763 | return false; | 761 | return false; |