- Add better protection against DoSing connecting users from connecting

- Have Com_sprintf return string length
- add STR_LEN macro for static strings
This commit is contained in:
Thilo Schulz 2011-07-07 16:07:58 +00:00
parent 53d89b6c10
commit 74e538ffcf
4 changed files with 37 additions and 18 deletions

View file

@ -197,7 +197,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