[master] 460b9ceaa params: Restrict some session timeouts
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Tue Mar 5 08:53:10 UTC 2024
commit 460b9ceaa4f75c6b92c3f49b0f24b86044cd40ce
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Fri Mar 1 10:52:26 2024 +0100
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().
diff --git a/include/tbl/params.h b/include/tbl/params.h
index 27127e15b..5f4359594 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",
More information about the varnish-commit
mailing list