From aeb008d4ef3674fd12ec9143def4f5195ba2005c Mon Sep 17 00:00:00 2001 From: n0n4m3 Date: Tue, 12 Jan 2010 21:08:40 +0300 Subject: Set close and delete unknown packets - helps with DDOS atack. Print ip address and port for unknown packets(if debug mode on) - helps determine the ip address of the attacking. --HG-- branch : trunk --- src/trinityrealm/AuthSocket.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/trinityrealm/AuthSocket.cpp') diff --git a/src/trinityrealm/AuthSocket.cpp b/src/trinityrealm/AuthSocket.cpp index ee71c523816..bc788426a8a 100644 --- a/src/trinityrealm/AuthSocket.cpp +++ b/src/trinityrealm/AuthSocket.cpp @@ -297,7 +297,8 @@ void AuthSocket::OnRead() ///- Report unknown commands in the debug log if (i == AUTH_TOTAL_COMMANDS) { - DEBUG_LOG("[Auth] got unknown packet %u", (uint32)_cmd); + DEBUG_LOG("[Auth] got unknown packet from '%s:%d'", GetRemoteAddress().c_str(), GetRemotePort()); + SetCloseAndDelete(); return; } } -- cgit v1.2.3