From 894325fe4135c5aa7918dd58bfcac006879b85d0 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Tue, 4 Oct 2011 22:16:01 +0200 Subject: [PATCH] Force client_flood_burst_rate and client_flood_burst_rate to at least rfc1459 values (5). --- src/s_conf.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/s_conf.c b/src/s_conf.c index 6f4e31365..2377419e3 100644 --- a/src/s_conf.c +++ b/src/s_conf.c @@ -863,9 +863,13 @@ validate_conf(void) } - /* RFC 1459 says 1 message per 2 seconds on average is acceptable, - * so allow at least that. + /* RFC 1459 says 1 message per 2 seconds on average and bursts of + * 5 messages are acceptable, so allow at least that. */ + if(ConfigFileEntry.client_flood_burst_rate < 5) + ConfigFileEntry.client_flood_burst_rate = 5; + if(ConfigFileEntry.client_flood_burst_max < 5) + ConfigFileEntry.client_flood_burst_max = 5; if(ConfigFileEntry.client_flood_message_time > ConfigFileEntry.client_flood_message_num * 2) ConfigFileEntry.client_flood_message_time =