mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
Core/Bnet: Add return LoginREST.ExternalAddress when LoginREST.LocalAddress is configured to localhost but client connects from a different machine in the network
This commit is contained in:
@@ -116,6 +116,8 @@ boost::asio::ip::tcp::endpoint const& LoginRESTService::GetAddressForClient(boos
|
||||
{
|
||||
if (address.is_loopback())
|
||||
return _localAddress;
|
||||
else if (_localAddress.address().is_loopback())
|
||||
return _externalAddress;
|
||||
|
||||
if (boost::asio::ip::address_v4::netmask(_localAddress.address().to_v4()).to_ulong() & address.to_v4().to_ulong())
|
||||
return _localAddress;
|
||||
|
||||
Reference in New Issue
Block a user