From 2f0f8f8018f4786b9e3e3eab9a9ec17c02668923 Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sun, 25 May 2014 15:26:49 +0200 Subject: [PATCH] Core/NetworkIO: Adjust packet throttling values Adjust packet throttling values to avoid false positive. In case you are experiencing random kicks change the PacketSpoof.Policy setting in worldserver configs and report which packets are triggering the anti-dos system. --- src/server/game/Server/WorldSession.cpp | 26 +++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp index 850aecbf16..81d33d30a3 100644 --- a/src/server/game/Server/WorldSession.cpp +++ b/src/server/game/Server/WorldSession.cpp @@ -1340,6 +1340,17 @@ uint32 WorldSession::DosProtection::GetMaxPacketCounterAllowed(uint16 opcode) co } case CMSG_MESSAGECHAT: + { + maxPacketCounterAllowed = 50; + break; + } + + case CMSG_CONTACT_LIST: + { + maxPacketCounterAllowed = 10; + break; + } + case CMSG_WHO: case CMSG_GAMEOBJ_USE: case CMSG_GAMEOBJ_REPORT_USE: @@ -1352,7 +1363,6 @@ uint32 WorldSession::DosProtection::GetMaxPacketCounterAllowed(uint16 opcode) co case CMSG_REQUEST_VEHICLE_NEXT_SEAT: case CMSG_REQUEST_VEHICLE_SWITCH_SEAT: case CMSG_TOGGLE_PVP: - case CMSG_CONTACT_LIST: case CMSG_ADD_FRIEND: case CMSG_DEL_FRIEND: case CMSG_SET_CONTACT_NOTES: @@ -1479,9 +1489,21 @@ uint32 WorldSession::DosProtection::GetMaxPacketCounterAllowed(uint16 opcode) co break; } + case CMSG_SET_ACTION_BUTTON: + { + maxPacketCounterAllowed = MAX_ACTION_BUTTONS; + break; + } + + case CMSG_ITEM_REFUND_INFO: + { + maxPacketCounterAllowed = PLAYER_SLOTS_COUNT; + break; + } + default: { - maxPacketCounterAllowed = 30; + maxPacketCounterAllowed = 100; break; } }