diff options
author | Melanie Thielker | 2016-12-11 20:50:17 +0000 |
---|---|---|
committer | Melanie Thielker | 2016-12-11 20:51:40 +0000 |
commit | ba61b64c424abed18052a68955f996d9eb81d9b7 (patch) | |
tree | 0eb74580ab2fcc890aea19cb6f3d5dd89d9a9173 /OpenSim | |
parent | Setting precise date of creation in NPC's profile. (diff) | |
download | opensim-SC_OLD-ba61b64c424abed18052a68955f996d9eb81d9b7.zip opensim-SC_OLD-ba61b64c424abed18052a68955f996d9eb81d9b7.tar.gz opensim-SC_OLD-ba61b64c424abed18052a68955f996d9eb81d9b7.tar.bz2 opensim-SC_OLD-ba61b64c424abed18052a68955f996d9eb81d9b7.tar.xz |
If a region address is resolveable to a single address, resolve it on
startup and use that address
This change facilitates running opensim within containers and VMs where
the external address isn't that of the VM/container but that of the
host.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/RegionInfo.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index ca17793..f764a34 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs | |||
@@ -708,7 +708,11 @@ namespace OpenSim.Framework | |||
708 | } | 708 | } |
709 | else | 709 | else |
710 | { | 710 | { |
711 | m_externalHostName = externalName; | 711 | IPAddress[] addrs = Dns.GetHostAddresses(externalName); |
712 | if (addrs.Length != 1) // If it is ambiguous or not resolveable, use it literally | ||
713 | m_externalHostName = externalName; | ||
714 | else | ||
715 | m_externalHostName = addrs[0].ToString(); | ||
712 | } | 716 | } |
713 | 717 | ||
714 | // RegionType | 718 | // RegionType |