summaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
authorAlexander Færøy <ahf@torproject.org>2021-10-21 12:35:26 +0000
committerAlexander Færøy <ahf@torproject.org>2021-10-21 12:35:26 +0000
commit0135fb028c8ca0ce310009f20efef89e53a36f2c (patch)
tree6aadf5f93ffc32d125125217420e3151512ba976 /src/app
parent5717b88bcb88d374b7b934622f0b7bf62cdab05c (diff)
parent265cca935aefd1a3bdbe6abc964858e10fb4a029 (diff)
downloadtor-0135fb028c8ca0ce310009f20efef89e53a36f2c.tar.gz
tor-0135fb028c8ca0ce310009f20efef89e53a36f2c.zip
Merge remote-tracking branch 'tor-gitlab/mr/338' into maint-0.4.5
Diffstat (limited to 'src/app')
-rw-r--r--src/app/config/config.c2
-rw-r--r--src/app/config/or_options_st.h4
-rw-r--r--src/app/config/testnet.inc1
3 files changed, 7 insertions, 0 deletions
diff --git a/src/app/config/config.c b/src/app/config/config.c
index abc64ee92d..f8a140ad9f 100644
--- a/src/app/config/config.c
+++ b/src/app/config/config.c
@@ -563,6 +563,7 @@ static const config_var_t option_vars_[] = {
V(MaxUnparseableDescSizeToLog, MEMUNIT, "10 MB"),
VPORT(MetricsPort),
V(MetricsPortPolicy, LINELIST, NULL),
+ V(TestingMinTimeToReportBandwidth, INTERVAL, "1 day"),
VAR("MyFamily", LINELIST, MyFamily_lines, NULL),
V(NewCircuitPeriod, INTERVAL, "30 seconds"),
OBSOLETE("NamingAuthoritativeDirectory"),
@@ -3986,6 +3987,7 @@ options_validate_cb(const void *old_options_, void *options_, char **msg)
CHECK_DEFAULT(TestingSigningKeySlop);
CHECK_DEFAULT(TestingAuthKeySlop);
CHECK_DEFAULT(TestingLinkKeySlop);
+ CHECK_DEFAULT(TestingMinTimeToReportBandwidth);
or_options_free(dflt_options);
}
#undef CHECK_DEFAULT
diff --git a/src/app/config/or_options_st.h b/src/app/config/or_options_st.h
index 4364f145ed..440c987365 100644
--- a/src/app/config/or_options_st.h
+++ b/src/app/config/or_options_st.h
@@ -1082,6 +1082,10 @@ struct or_options_t {
/** List of policy allowed to query the Metrics port. */
struct config_line_t *MetricsPortPolicy;
+ /** How far must we be into the current bandwidth-measurement period to
+ * report bandwidth observations from this period? */
+ int TestingMinTimeToReportBandwidth;
+
/**
* Configuration objects for individual modules.
*
diff --git a/src/app/config/testnet.inc b/src/app/config/testnet.inc
index 00b307782b..039454a0d0 100644
--- a/src/app/config/testnet.inc
+++ b/src/app/config/testnet.inc
@@ -19,6 +19,7 @@
{ "TestingV3AuthInitialDistDelay", "20 seconds" },
{ "TestingAuthDirTimeToLearnReachability", "0 minutes" },
{ "MinUptimeHidServDirectoryV2", "0 minutes" },
+{ "TestingMinTimeToReportBandwidth", "0 seconds" },
{ "TestingServerDownloadInitialDelay", "0" },
{ "TestingClientDownloadInitialDelay", "0" },
{ "TestingServerConsensusDownloadInitialDelay", "0" },