aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorn0n4m3 <none@none>2010-01-12 21:08:40 +0300
committern0n4m3 <none@none>2010-01-12 21:08:40 +0300
commitaeb008d4ef3674fd12ec9143def4f5195ba2005c (patch)
tree24acbdaf1501c466d1fb5ea37ea29b22087216af
parent943b3195da5076727bfeba4090f6ee605605e4fe (diff)
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
-rw-r--r--src/trinityrealm/AuthSocket.cpp3
1 files changed, 2 insertions, 1 deletions
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;
}
}