Do not perform denial of service check in LAN games.
This commit is contained in:
@@ -989,6 +989,9 @@ ServerLobbyThread::HandleNetPacketInit(SessionWrapper session, const InitMessage
|
||||
// Before any other processing, perform some denial of service and
|
||||
// brute force attack prevention by checking whether the user recently sent an
|
||||
// Init packet.
|
||||
// This check is not performed on LAN servers.
|
||||
if (m_mode != SERVER_MODE_LAN)
|
||||
{
|
||||
bool recentlySentInit = false;
|
||||
{
|
||||
boost::mutex::scoped_lock lock(m_timerClientAddressMapMutex);
|
||||
@@ -1002,6 +1005,7 @@ ServerLobbyThread::HandleNetPacketInit(SessionWrapper session, const InitMessage
|
||||
SessionError(session, ERR_NET_INIT_BLOCKED);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Check the protocol version.
|
||||
if (initMessage.requestedVersion.major != NET_VERSION_MAJOR
|
||||
|
||||
@@ -223,7 +223,7 @@ private:
|
||||
ServerIrcBotCallback &m_ircBotCb;
|
||||
AvatarManager &m_avatarManager;
|
||||
|
||||
ServerMode m_mode;
|
||||
const ServerMode m_mode;
|
||||
std::string m_statisticsFileName;
|
||||
ConfigFile *m_serverConfig;
|
||||
u_int32_t m_curGameId;
|
||||
|
||||
Reference in New Issue
Block a user