mirror of
https://github.com/SWG-Source/src.git
synced 2026-07-29 23:15:56 -04:00
add logging
This commit is contained in:
+5
-1
@@ -6,10 +6,14 @@ if(WIN32)
|
||||
add_definitions(/D_CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${SWG_ENGINE_SOURCE_DIR}/shared/library/sharedLog/include/public
|
||||
)
|
||||
|
||||
add_definitions(-DREENTRANT)
|
||||
|
||||
target_link_libraries(sharedLog)
|
||||
|
||||
add_library(udplibrary
|
||||
hashtable.hpp
|
||||
PointerDeque.hpp
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user