Do not perform denial of service check in LAN games.

This commit is contained in:
lotodore
2010-09-03 21:40:14 +00:00
parent 9254cacdf7
commit 9bf9aea7f2
2 changed files with 16 additions and 12 deletions
+4
View File
@@ -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
+1 -1
View File
@@ -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;