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.
melanie
Melanie Thielker 2016-12-11 20:50:17 +00:00
parent 5b7986e6be
commit ba61b64c42
1 changed files with 5 additions and 1 deletions

View File

@ -708,7 +708,11 @@ namespace OpenSim.Framework
}
else
{
m_externalHostName = externalName;
IPAddress[] addrs = Dns.GetHostAddresses(externalName);
if (addrs.Length != 1) // If it is ambiguous or not resolveable, use it literally
m_externalHostName = externalName;
else
m_externalHostName = addrs[0].ToString();
}
// RegionType