aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/serverauthentication.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-12-24 23:48:58 +0000
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-12-24 23:48:58 +0000
commita5485d77e4695fa777cae689aa9196ff63d3dd36 (patch)
tree78b1794526c073f8892d5f3a9f2f7b278293b955 /NorthstarDedicatedTest/serverauthentication.cpp
parent53268da81402f37bd77aa5392bba5d2d66b66403 (diff)
downloadNorthstarLauncher-a5485d77e4695fa777cae689aa9196ff63d3dd36.tar.gz
NorthstarLauncher-a5485d77e4695fa777cae689aa9196ff63d3dd36.zip
add logging to connectionless ratelimits
Diffstat (limited to 'NorthstarDedicatedTest/serverauthentication.cpp')
-rw-r--r--NorthstarDedicatedTest/serverauthentication.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/NorthstarDedicatedTest/serverauthentication.cpp b/NorthstarDedicatedTest/serverauthentication.cpp
index ac4c4709..21be404c 100644
--- a/NorthstarDedicatedTest/serverauthentication.cpp
+++ b/NorthstarDedicatedTest/serverauthentication.cpp
@@ -413,6 +413,8 @@ bool ProcessConnectionlessPacketHook(void* a1, netpacket_t* packet)
if (sendData->packetCount >= Cvar_sv_querylimit_per_sec->m_nValue)
{
+ spdlog::warn("Client went over connectionless ratelimit of {} per sec with packet of type {}", Cvar_sv_querylimit_per_sec->m_nValue, packet->data[4]);
+
// timeout for a minute
sendData->timeoutEnd = Plat_FloatTime() + 60.0;
return false;
@@ -435,7 +437,7 @@ void InitialiseServerAuthentication(HMODULE baseAddress)
Cvar_net_chan_limit_mode = RegisterConVar("net_chan_limit_mode", "0", FCVAR_GAMEDLL, "The mode for netchan processing limits: 0 = none, 1 = kick, 2 = log");
Cvar_net_chan_limit_msec_per_sec = RegisterConVar("net_chan_limit_msec_per_sec", "0", FCVAR_GAMEDLL, "Netchannel processing is limited to so many milliseconds, abort connection if exceeding budget");
Cvar_ns_player_auth_port = RegisterConVar("ns_player_auth_port", "8081", FCVAR_GAMEDLL, "");
- Cvar_sv_querylimit_per_sec = RegisterConVar("sv_querylimit_per_sec", "15", FCVAR_GAMEDLL, "");
+ Cvar_sv_querylimit_per_sec = RegisterConVar("sv_querylimit_per_sec", "10", FCVAR_GAMEDLL, "");
HookEnabler hook;
ENABLER_CREATEHOOK(hook, (char*)baseAddress + 0x114430, &CBaseServer__ConnectClientHook, reinterpret_cast<LPVOID*>(&CBaseServer__ConnectClient));