Do not allow DPD to be disabled.

Doing so would prevent the server from dropping inactive
connections. If the dpd values are not configured, set some
reasonable defaults.
This commit is contained in:
Nikos Mavrogiannopoulos
2014-02-17 22:40:32 +01:00
parent faf0a7133b
commit c5c38e92bd
3 changed files with 12 additions and 5 deletions
+6
View File
@@ -323,7 +323,13 @@ unsigned force_cert_auth;
READ_NUMERIC("udp-port", config->udp_port);
READ_NUMERIC("keepalive", config->keepalive);
READ_NUMERIC("dpd", config->dpd);
if (config->dpd == 0)
config->dpd = DEFAULT_DPD_TIME;
READ_NUMERIC("mobile-dpd", config->mobile_dpd);
if (config->mobile_dpd == 0)
config->mobile_dpd = DEFAULT_MOBILE_DPD_TIME;
READ_NUMERIC("rate-limit-ms", config->rate_limit_ms);
READ_STRING("ocsp-response", config->ocsp_response);