From 4a7588b0f0a7a03c94c69c45dec6b115dc86f19d 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/Region/Framework/Scenes/Scene.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 091fdeb..f1828da 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2728,7 +2728,9 @@ namespace OpenSim.Region.Framework.Scenes IUserAgentVerificationModule userVerification = RequestModuleInterface(); if (userVerification != null && ep != null) { - if (!userVerification.VerifyClient(aCircuit, ep.Address.ToString())) + System.Net.IPAddress addr = NetworkUtil.GetExternalIPOf(ep.Address); + + if (!userVerification.VerifyClient(aCircuit, /*ep.Address.ToString() */ addr.ToString())) { // uh-oh, this is fishy m_log.DebugFormat("[Scene]: User Client Verification for {0} {1} in {2} returned false", aCircuit.firstname, aCircuit.lastname, RegionInfo.RegionName); -- cgit v1.1