net.AllowRPCDoSDetectionKicking
net.AllowRPCDoSDetectionKicking
#Overview
name: net.AllowRPCDoSDetectionKicking
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Overrides whether or not RPC DoS Detection kicking is enabled. 0 = disabled, 1 = enabled.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of net.AllowRPCDoSDetectionKicking is to control whether the Remote Procedure Call (RPC) Denial of Service (DoS) detection system can kick players from the game when potential DoS attacks are detected.
This setting variable is primarily used by the networking subsystem of Unreal Engine, specifically within the RPC DoS detection module. It’s part of the Engine’s security measures to protect against potential network-based attacks.
The value of this variable is set through a console variable (CVar) system. It’s initialized with a default value of 1 (enabled) but can be changed at runtime through console commands or configuration files.
The associated variable CVarAllowRPCDoSDetectionKicking interacts directly with net.AllowRPCDoSDetectionKicking. They share the same value and purpose.
Developers must be aware that:
- This variable is a binary switch (0 = disabled, 1 = enabled).
- Disabling this feature (setting to 0) will prevent the RPC DoS detection system from kicking players, even if a potential attack is detected.
- The system will still detect and track potential DoS attempts even if kicking is disabled.
Best practices when using this variable include:
- Generally, leave it enabled (1) in production environments to maintain security.
- Consider disabling it (0) temporarily during development or testing if you’re experiencing false positives.
- Monitor logs and server performance when changing this setting to ensure it doesn’t negatively impact legitimate gameplay.
Regarding the associated variable CVarAllowRPCDoSDetectionKicking:
- Its purpose is identical to net.AllowRPCDoSDetectionKicking.
- It’s used internally by the Engine code to retrieve the current setting value.
- The value is accessed using the GetValueOnAnyThread() method, which suggests it’s designed for multi-threaded environments.
- When this value is 0, the system will prevent transitions to kick states in the DoS detection severity levels.
Developers should treat CVarAllowRPCDoSDetectionKicking as the programmatic interface to the net.AllowRPCDoSDetectionKicking setting within C++ code. Any logic depending on this setting should use CVarAllowRPCDoSDetectionKicking.GetValueOnAnyThread() to check its current state.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Net/RPCDoSDetection.cpp:63
Scope: file
Source code excerpt:
TAutoConsoleVariable<int32> CVarAllowRPCDoSDetectionKicking(
TEXT("net.AllowRPCDoSDetectionKicking"), 1,
TEXT("Overrides whether or not RPC DoS Detection kicking is enabled. 0 = disabled, 1 = enabled."));
TAutoConsoleVariable<FString> CVarRPCDoSForcedRPCTracking(
TEXT("net.RPCDoSForcedRPCTracking"), TEXT(""),
TEXT("Sets a single RPC that, when encountered, forcibly enables RPC tracking (limited to one RPC for performance). ")
TEXT("Can also specify a random chance, between 0.0 and 1.0, for when encountering the RPC enables tracking, ")
#Associated Variable and Callsites
This variable is associated with another variable named CVarAllowRPCDoSDetectionKicking
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Net/RPCDoSDetection.cpp:62
Scope: file
Source code excerpt:
TEXT("Overrides whether or not RPC DoS Detection RPC blocking is allowed. 0 = disabled, 1 = enabled."));
TAutoConsoleVariable<int32> CVarAllowRPCDoSDetectionKicking(
TEXT("net.AllowRPCDoSDetectionKicking"), 1,
TEXT("Overrides whether or not RPC DoS Detection kicking is enabled. 0 = disabled, 1 = enabled."));
TAutoConsoleVariable<FString> CVarRPCDoSForcedRPCTracking(
TEXT("net.RPCDoSForcedRPCTracking"), TEXT(""),
TEXT("Sets a single RPC that, when encountered, forcibly enables RPC tracking (limited to one RPC for performance). ")
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Net/RPCDoSDetection.cpp:509
Scope (from outer to inner):
file
function void FRPCDoSDetection::UpdateSeverity_Private
Source code excerpt:
// If kicking is disabled, and the new state is the kick state, exclude that state (otherwise RPC DoS Detection will become stuck)
const bool bPreventKick = CVarAllowRPCDoSDetectionKicking.GetValueOnAnyThread() == 0;
if (DetectionSeverity[NewStateIdx].bKickPlayer && bPreventKick)
{
NewStateIdx = ActiveState;
}