diff options
-rw-r--r-- | OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs | 2 | ||||
-rw-r--r-- | OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | 2 | ||||
-rw-r--r-- | OpenSim/Services/HypergridService/UserAgentService.cs | 12 |
3 files changed, 11 insertions, 5 deletions
diff --git a/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs b/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs index a5ec4f2..0066bd4 100644 --- a/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs +++ b/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs | |||
@@ -217,6 +217,8 @@ namespace OpenSim.Server.Handlers.Hypergrid | |||
217 | Hashtable headers = (Hashtable)request["headers"]; | 217 | Hashtable headers = (Hashtable)request["headers"]; |
218 | if (headers.ContainsKey("X-Forwarded-For") && headers["X-Forwarded-For"] != null) | 218 | if (headers.ContainsKey("X-Forwarded-For") && headers["X-Forwarded-For"] != null) |
219 | { | 219 | { |
220 | m_log.DebugFormat("[HOME AGENT HANDLER]: XFF is {0}", headers["X-Forwarded-For"]); | ||
221 | |||
220 | IPEndPoint ep = Util.GetClientIPFromXFF((string)headers["X-Forwarded-For"]); | 222 | IPEndPoint ep = Util.GetClientIPFromXFF((string)headers["X-Forwarded-For"]); |
221 | if (ep != null) | 223 | if (ep != null) |
222 | return ep.Address.ToString(); | 224 | return ep.Address.ToString(); |
diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs index 24ae81f..9c41bcb 100644 --- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | |||
@@ -202,6 +202,8 @@ namespace OpenSim.Server.Handlers.Simulation | |||
202 | Hashtable headers = (Hashtable)request["headers"]; | 202 | Hashtable headers = (Hashtable)request["headers"]; |
203 | if (headers.ContainsKey("X-Forwarded-For") && headers["X-Forwarded-For"] != null) | 203 | if (headers.ContainsKey("X-Forwarded-For") && headers["X-Forwarded-For"] != null) |
204 | { | 204 | { |
205 | m_log.DebugFormat("[AGENT HANDLER]: XFF is {0}", headers["X-Forwarded-For"]); | ||
206 | |||
205 | IPEndPoint ep = Util.GetClientIPFromXFF((string)headers["X-Forwarded-For"]); | 207 | IPEndPoint ep = Util.GetClientIPFromXFF((string)headers["X-Forwarded-For"]); |
206 | if (ep != null) | 208 | if (ep != null) |
207 | return ep.Address.ToString(); | 209 | return ep.Address.ToString(); |
diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index 12dda48..3ead180 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs | |||
@@ -155,7 +155,7 @@ namespace OpenSim.Services.HypergridService | |||
155 | string myExternalIP = string.Empty; | 155 | string myExternalIP = string.Empty; |
156 | string gridName = gatekeeper.ServerURI; | 156 | string gridName = gatekeeper.ServerURI; |
157 | 157 | ||
158 | m_log.DebugFormat("[USER AGENT SERVICE]: m_grid - {0}, gn - {1}", m_GridName, gridName); | 158 | m_log.DebugFormat("[USER AGENT SERVICE]: this grid: {0}, desired grid: {1}", m_GridName, gridName); |
159 | 159 | ||
160 | if (m_GridName == gridName) | 160 | if (m_GridName == gridName) |
161 | success = m_GatekeeperService.LoginAgent(agentCircuit, finalDestination, out reason); | 161 | success = m_GatekeeperService.LoginAgent(agentCircuit, finalDestination, out reason); |
@@ -266,11 +266,13 @@ namespace OpenSim.Services.HypergridService | |||
266 | 266 | ||
267 | if (m_TravelingAgents.ContainsKey(sessionID)) | 267 | if (m_TravelingAgents.ContainsKey(sessionID)) |
268 | { | 268 | { |
269 | m_log.DebugFormat("[USER AGENT SERVICE]: Comparing with login IP {0} and MyIP {1}", | 269 | bool result = m_TravelingAgents[sessionID].ClientIPAddress == reportedIP || |
270 | m_TravelingAgents[sessionID].ClientIPAddress, m_TravelingAgents[sessionID].MyIpAddress); | ||
271 | |||
272 | return m_TravelingAgents[sessionID].ClientIPAddress == reportedIP || | ||
273 | m_TravelingAgents[sessionID].MyIpAddress == reportedIP; // NATed | 270 | m_TravelingAgents[sessionID].MyIpAddress == reportedIP; // NATed |
271 | |||
272 | m_log.DebugFormat("[USER AGENT SERVICE]: Comparing {0} with login IP {1} and MyIP {1}; result is {3}", | ||
273 | reportedIP, m_TravelingAgents[sessionID].ClientIPAddress, m_TravelingAgents[sessionID].MyIpAddress, result); | ||
274 | |||
275 | return result; | ||
274 | } | 276 | } |
275 | 277 | ||
276 | return false; | 278 | return false; |