add logging

This commit is contained in:
DarthArgus
2016-09-28 23:26:04 -05:00
parent af9701a816
commit df1090e4dc
2 changed files with 8 additions and 1 deletions
+3
View File
@@ -5,6 +5,7 @@
#include <string.h>
#include "UdpLibrary.hpp"
#include "sharedLog/Log.h"
#if defined(WIN32)
#pragma warning(disable : 4710)
@@ -1022,6 +1023,8 @@ void UdpManager::ProcessRawPacket(const PacketHistoryEntry *e)
{
if (mIpConnectionCount[e->mIp.GetAddress()] >= mParams.maxConnectionsPerIP)
{
LOG("UdpDosLog", ("Potential DoS Attack! Client at IP %s tried to exceed maxConnectionsPerIP (%i)", e->mIp.GetV4Address(), mParams.maxConnectionsPerIP));
con->InternalDisconnect(0, UdpConnection::cDisconnectDosAsshole);
con->SetSilentDisconnect(true); // screw you, jerk
con->Release();