From 35e5139dabb5911647617437761009ccffbe838b Mon Sep 17 00:00:00 2001 From: Dridi Boukelmoune Date: Fri, 1 Mar 2024 10:52:26 +0100 Subject: [PATCH] params: Restrict some session timeouts The timeout_* parameters are used in duration arithmetics and the simplest is to not grant them the ability to be disabled. Both timeout_idle and idle_send_timeout appear in a CondWait context. For this reason both need to be capped to 1h, matching the implicit limit in Lck_CondWaitTimeout(). --- include/tbl/params.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/tbl/params.h b/include/tbl/params.h index 27127e15b5..5f4359594f 100644 --- a/include/tbl/params.h +++ b/include/tbl/params.h @@ -643,9 +643,9 @@ PARAM_SIMPLE( PARAM_SIMPLE( /* name */ idle_send_timeout, /* type */ timeout, - /* min */ "0.000", - /* max */ NULL, - /* def */ "60.000", + /* min */ "0s", + /* max */ "1h", + /* def */ "60s", /* units */ "seconds", /* descr */ "Send timeout for individual pieces of data on client connections." @@ -946,10 +946,10 @@ PARAM_SIMPLE( PARAM_SIMPLE( /* name */ timeout_idle, - /* type */ timeout, - /* min */ "0.000", - /* max */ NULL, - /* def */ "5.000", + /* type */ duration, + /* min */ "0s", + /* max */ "1h", + /* def */ "5s", /* units */ "seconds", /* descr */ "Idle timeout for client connections.\n\n" @@ -962,7 +962,7 @@ PARAM_SIMPLE( PARAM_SIMPLE( /* name */ timeout_linger, - /* type */ timeout, + /* type */ duration, /* min */ "0.000", /* max */ NULL, /* def */ "0.050",