summaryrefslogtreecommitdiff
path: root/src/server/server.h
diff options
context:
space:
mode:
authorThilo Schulz <arny@ats.s.bawue.de>2011-07-07 16:07:58 +0000
committerTim Angus <tim@ngus.net>2013-01-10 21:57:38 +0000
commit24661b24813af79575032cb1bcb55b28208ab76d (patch)
treea00895448a3f7955227fdd864154ba11e9fac8a1 /src/server/server.h
parent344f803c0fa88083e3597438cf0cdf86d5d3d486 (diff)
- Add better protection against DoSing connecting users from connecting - Have Com_sprintf return string length - add STR_LEN macro for static strings
Diffstat (limited to 'src/server/server.h')
-rw-r--r--src/server/server.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/server/server.h b/src/server/server.h
index af3ebe7c..697d8a30 100644
--- a/src/server/server.h
+++ b/src/server/server.h
@@ -205,7 +205,11 @@ typedef struct client_s {
// MAX_CHALLENGES is made large to prevent a denial
// of service attack that could cycle all of them
// out before legitimate users connected
-#define MAX_CHALLENGES 1024
+#define MAX_CHALLENGES 2048
+// Allow a certain amount of challenges to have the same IP address
+// to make it a bit harder to DOS one single IP address from connecting
+// while not allowing a single ip to grab all challenge resources
+#define MAX_CHALLENGES_MULTI (MAX_CHALLENGES / 2)
#define AUTHORIZE_TIMEOUT 5000