aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2008-11-26 09:22:19 +0000
committerTobias Brunner <tobias@strongswan.org>2008-11-26 09:22:19 +0000
commit69e9698b17261fed97c2bc22100e338ae7736bc7 (patch)
treef8f2ffd2264faed22c24bad1d5a037a172a43649 /src
parent999072ea02919fc695ed0b1249e75e2012bce4b2 (diff)
downloadstrongswan-69e9698b17261fed97c2bc22100e338ae7736bc7.tar.bz2
strongswan-69e9698b17261fed97c2bc22100e338ae7736bc7.tar.xz
allow to globally disable DOS protection by setting charon.dos_protection to no.
Diffstat (limited to 'src')
-rw-r--r--src/charon/network/receiver.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/charon/network/receiver.c b/src/charon/network/receiver.c
index 18a4b4f76..9c413526a 100644
--- a/src/charon/network/receiver.c
+++ b/src/charon/network/receiver.c
@@ -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);