allow to globally disable DOS protection by setting charon.dos_protection to no.

This commit is contained in:
Tobias Brunner 2008-11-26 09:22:19 +00:00
parent 999072ea02
commit 69e9698b17
1 changed files with 5 additions and 0 deletions

View File

@ -382,6 +382,11 @@ receiver_t *receiver_create()
"charon.cookie_threshold", COOKIE_THRESHOLD_DEFAULT);
this->block_threshold = lib->settings->get_int(lib->settings,
"charon.block_threshold", BLOCK_THRESHOLD_DEFAULT);
if (!lib->settings->get_bool(lib->settings, "charon.dos_protection", TRUE))
{
this->cookie_threshold = 0;
this->block_threshold = 0;
}
this->job = callback_job_create((callback_job_cb_t)receive_packets,
this, NULL, NULL);