From 3a6405d2f77ec99fb5592fa9d6aa5884dfbef22f Mon Sep 17 00:00:00 2001 From: Tedd Hansen Date: Sat, 2 Feb 2008 16:03:10 +0000 Subject: In an attempt to solve multihomed UDP problem I seem to have bound UDP socket to external IP instead of internal :) --- OpenSim/Region/ClientStack/RegionApplicationBase.cs | 6 +++--- OpenSim/Region/ClientStack/UDPServer.cs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index f8b0c9e..4dce9e7 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs @@ -109,9 +109,9 @@ namespace OpenSim.Region.ClientStack protected Scene SetupScene(RegionInfo regionInfo, out UDPServer udpServer, bool m_permissions) { AgentCircuitManager circuitManager = new AgentCircuitManager(); - IPAddress listenIP; - if (!IPAddress.TryParse(regionInfo.ExternalHostName, out listenIP)) - listenIP = IPAddress.Parse("0.0.0.0"); + IPAddress listenIP = regionInfo.InternalEndPoint.Address; + //if (!IPAddress.TryParse(regionInfo.InternalEndPoint, out listenIP)) + // listenIP = IPAddress.Parse("0.0.0.0"); uint port = (uint) regionInfo.InternalEndPoint.Port; udpServer = new UDPServer(listenIP, ref port, regionInfo.m_allow_alternate_ports, m_assetCache, m_log, circuitManager); diff --git a/OpenSim/Region/ClientStack/UDPServer.cs b/OpenSim/Region/ClientStack/UDPServer.cs index 0fd3486..3e2b536 100644 --- a/OpenSim/Region/ClientStack/UDPServer.cs +++ b/OpenSim/Region/ClientStack/UDPServer.cs @@ -260,7 +260,7 @@ namespace OpenSim.Region.ClientStack for (uint i = 0; i < 20; i++) { newPort = listenPort + i; - m_log.Verbose("SERVER", "Opening UDP socket on " + listenIP.ToString() + " " + newPort + ". Allow alternate ports: " + Allow_Alternate_Port.ToString()); + m_log.Verbose("SERVER", "Opening UDP socket on " + listenIP.ToString() + " " + newPort + ".");// Allow alternate ports: " + Allow_Alternate_Port.ToString()); try { ServerIncoming = new IPEndPoint(listenIP, (int) newPort); @@ -272,7 +272,7 @@ namespace OpenSim.Region.ClientStack catch (Exception ex) { // We are not looking for alternate ports? - if (!Allow_Alternate_Port) + //if (!Allow_Alternate_Port) throw (ex); // We are looking for alternate ports! -- cgit v1.1