summaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2021-03-12 08:40:26 -0500
committerDavid Goulet <dgoulet@torproject.org>2021-03-17 11:53:09 -0400
commit066748c9cde058db4c12dec0675c036ac11d7e84 (patch)
tree611902268bbf51261e86cb9454cd23b4be652a87 /src/app
parente8d224dfb14a73e6b47ab09def56217f66a2ea46 (diff)
downloadtor-066748c9cde058db4c12dec0675c036ac11d7e84.tar.gz
tor-066748c9cde058db4c12dec0675c036ac11d7e84.zip
Add a DormantTimeoutEnabled to disable dormant mode entirely
(If you need to do this in an older version you can just set DormantClientTimeout to something huge.) Closes #40228.
Diffstat (limited to 'src/app')
-rw-r--r--src/app/config/config.c5
-rw-r--r--src/app/config/or_options_st.h7
2 files changed, 10 insertions, 2 deletions
diff --git a/src/app/config/config.c b/src/app/config/config.c
index fa74907b3d..5b36554851 100644
--- a/src/app/config/config.c
+++ b/src/app/config/config.c
@@ -424,8 +424,9 @@ static const config_var_t option_vars_[] = {
OBSOLETE("DynamicDHGroups"),
VPORT(DNSPort),
OBSOLETE("DNSListenAddress"),
- V(DormantClientTimeout, INTERVAL, "24 hours"),
- V(DormantTimeoutDisabledByIdleStreams, BOOL, "1"),
+ V(DormantClientTimeout, INTERVAL, "24 hours"),
+ V(DormantTimeoutEnabled, BOOL, "1"),
+ V(DormantTimeoutDisabledByIdleStreams, BOOL, "1"),
V(DormantOnFirstStartup, BOOL, "0"),
V(DormantCanceledByStartup, BOOL, "0"),
/* DoS circuit creation options. */
diff --git a/src/app/config/or_options_st.h b/src/app/config/or_options_st.h
index 4364f145ed..af38be585f 100644
--- a/src/app/config/or_options_st.h
+++ b/src/app/config/or_options_st.h
@@ -1065,6 +1065,13 @@ struct or_options_t {
**/
int DormantClientTimeout;
+ /**
+ * Boolean: If enabled, then we consider the timeout when deciding whether
+ * to be dormant. If not enabled, then only the SIGNAL ACTIVE/DORMANT
+ * controls can change our status.
+ **/
+ int DormantTimeoutEnabled;
+
/** Boolean: true if having an idle stream is sufficient to prevent a client
* from becoming dormant.
**/