aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorAdam Frisby2009-05-24 01:36:13 +0000
committerAdam Frisby2009-05-24 01:36:13 +0000
commitac79ff8dc605c6b1cee4316e5648902d123206e7 (patch)
tree2744287a26d94ab1d7e19c9bc8ed9fe158983e57 /OpenSim
parentThis should make HG asset transfers work much better. It now uses HGUuidGathe... (diff)
downloadopensim-SC_OLD-ac79ff8dc605c6b1cee4316e5648902d123206e7.zip
opensim-SC_OLD-ac79ff8dc605c6b1cee4316e5648902d123206e7.tar.gz
opensim-SC_OLD-ac79ff8dc605c6b1cee4316e5648902d123206e7.tar.bz2
opensim-SC_OLD-ac79ff8dc605c6b1cee4316e5648902d123206e7.tar.xz
* Adds NAT routing support for MXP Asset Delivery. (This means MXP should be fully NAT compatible.)
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs11
-rw-r--r--OpenSim/Framework/NetworkUtil.cs12
2 files changed, 13 insertions, 10 deletions
diff --git a/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs b/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs
index 2f60810..7eab7c5 100644
--- a/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs
+++ b/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs
@@ -450,11 +450,18 @@ namespace OpenSim.Client.MXP.PacketHandler
450 450
451 joinResponseMessage.RequestMessageId = joinRequestMessage.MessageId; 451 joinResponseMessage.RequestMessageId = joinRequestMessage.MessageId;
452 joinResponseMessage.FailureCode = MxpResponseCodes.SUCCESS; 452 joinResponseMessage.FailureCode = MxpResponseCodes.SUCCESS;
453 453
454 joinResponseMessage.BubbleId = joinRequestMessage.BubbleId; 454 joinResponseMessage.BubbleId = joinRequestMessage.BubbleId;
455 joinResponseMessage.ParticipantId = userId.Guid; 455 joinResponseMessage.ParticipantId = userId.Guid;
456 joinResponseMessage.AvatarId = userId.Guid; 456 joinResponseMessage.AvatarId = userId.Guid;
457 joinResponseMessage.BubbleAssetCacheUrl = "http://"+m_scenes[new UUID(joinRequestMessage.BubbleId)].RegionInfo.ExternalHostName+":"+m_scenes[new UUID(joinRequestMessage.BubbleId)].RegionInfo.HttpPort+"/assets/"; 457 joinResponseMessage.BubbleAssetCacheUrl = "http://" +
458 NetworkUtil.GetHostFor(session.RemoteEndPoint.Address,
459 m_scenes[
460 new UUID(joinRequestMessage.BubbleId)].
461 RegionInfo.
462 ExternalHostName) + ":" +
463 m_scenes[new UUID(joinRequestMessage.BubbleId)].RegionInfo.
464 HttpPort + "/assets/";
458 465
459 joinResponseMessage.BubbleName = m_scenes[new UUID(joinRequestMessage.BubbleId)].RegionInfo.RegionName; 466 joinResponseMessage.BubbleName = m_scenes[new UUID(joinRequestMessage.BubbleId)].RegionInfo.RegionName;
460 467
diff --git a/OpenSim/Framework/NetworkUtil.cs b/OpenSim/Framework/NetworkUtil.cs
index 328d3bc..3ea5ac5 100644
--- a/OpenSim/Framework/NetworkUtil.cs
+++ b/OpenSim/Framework/NetworkUtil.cs
@@ -31,7 +31,7 @@ namespace OpenSim.Framework
31 { 31 {
32 if (host.Equals(user) && host.AddressFamily == AddressFamily.InterNetwork) 32 if (host.Equals(user) && host.AddressFamily == AddressFamily.InterNetwork)
33 { 33 {
34 m_log.Info("[NATROUTING] Localhost user detected, sending them '" + host + "' instead of '" + simulator + "'"); 34 m_log.Info("[NetworkUtil] Localhost user detected, sending them '" + host + "' instead of '" + simulator + "'");
35 return host; 35 return host;
36 } 36 }
37 } 37 }
@@ -62,7 +62,7 @@ namespace OpenSim.Framework
62 62
63 if (valid) 63 if (valid)
64 { 64 {
65 m_log.Info("[NATROUTING] Local LAN user detected, sending them '" + subnet.Key + "' instead of '" + simulator + "'"); 65 m_log.Info("[NetworkUtil] Local LAN user detected, sending them '" + subnet.Key + "' instead of '" + simulator + "'");
66 return subnet.Key; 66 return subnet.Key;
67 } 67 }
68 } 68 }
@@ -80,7 +80,7 @@ namespace OpenSim.Framework
80 { 80 {
81 if (host.AddressFamily == AddressFamily.InterNetworkV6) 81 if (host.AddressFamily == AddressFamily.InterNetworkV6)
82 { 82 {
83 m_log.Info("[NATROUTING] Localhost user detected, sending them '" + host + "' instead of '" + defaultHostname + "'"); 83 m_log.Info("[NetworkUtil] Localhost user detected, sending them '" + host + "' instead of '" + defaultHostname + "'");
84 return host; 84 return host;
85 } 85 }
86 } 86 }
@@ -126,7 +126,7 @@ namespace OpenSim.Framework
126 126
127 if (valid) 127 if (valid)
128 { 128 {
129 m_log.Info("[NATROUTING] Local LAN user detected, sending them '" + subnet.Key + "' instead of '" + defaultHostname + "'"); 129 m_log.Info("[NetworkUtil] Local LAN user detected, sending them '" + subnet.Key + "' instead of '" + defaultHostname + "'");
130 return subnet.Key; 130 return subnet.Key;
131 } 131 }
132 } 132 }
@@ -154,10 +154,6 @@ namespace OpenSim.Framework
154 { 154 {
155 m_subnets.Add(address.Address, address.IPv4Mask); 155 m_subnets.Add(address.Address, address.IPv4Mask);
156 } 156 }
157 else
158 {
159 m_log.Warn("[NetworkUtil] Found IPv4 Address without Subnet Mask!?");
160 }
161 } 157 }
162 } 158 }
163 } 159 }