From ab9b08e5845b0ff19814c996ad0cfb1dccab2790 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Fri, 18 Feb 2011 23:46:02 +0000 Subject: [PATCH] * Fix Sys_Milliseconds wrapping causing the flood protection code to malfunction and block all traffic (reported by bubu^) --- code/server/sv_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/server/sv_main.c b/code/server/sv_main.c index 3cb9f4f2..01411cb1 100644 --- a/code/server/sv_main.c +++ b/code/server/sv_main.c @@ -444,7 +444,8 @@ static leakyBucket_t *SVC_BucketForAddress( netadr_t address, int burst, int per interval = now - bucket->lastTime; // Reclaim expired buckets - if ( bucket->lastTime > 0 && interval > ( burst * period ) ) { + if ( bucket->lastTime > 0 && ( interval > ( burst * period ) || + interval < 0 ) ) { if ( bucket->prev != NULL ) { bucket->prev->next = bucket->next; } else {