mirror of
https://github.com/matrix-construct/construct
synced 2025-01-03 19:34:29 +01:00
Force client_flood_burst_rate and client_flood_burst_rate to at least rfc1459 values (5).
This commit is contained in:
parent
5a72f20c2c
commit
894325fe41
1 changed files with 6 additions and 2 deletions
|
@ -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 =
|
||||
|
|
Loading…
Reference in a new issue