aboutsummaryrefslogtreecommitdiff
path: root/src/feature/dirauth
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-01-17 08:31:18 -0500
committerNick Mathewson <nickm@torproject.org>2020-01-17 08:31:22 -0500
commit6d2b9c963100dab56f61786b65d8629faaada7ad (patch)
tree25d569f6e88421284d86dc6526f9718fc7d47288 /src/feature/dirauth
parent648e1afc330ca32ad8f0b29c584bf38afefa85ea (diff)
downloadtor-6d2b9c963100dab56f61786b65d8629faaada7ad.tar.gz
tor-6d2b9c963100dab56f61786b65d8629faaada7ad.zip
Remove some dead checks
The only code that could set these options to be negative was in the unit tests.
Diffstat (limited to 'src/feature/dirauth')
-rw-r--r--src/feature/dirauth/dirauth_config.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/feature/dirauth/dirauth_config.c b/src/feature/dirauth/dirauth_config.c
index 4a3f569966..7895e3817f 100644
--- a/src/feature/dirauth/dirauth_config.c
+++ b/src/feature/dirauth/dirauth_config.c
@@ -403,12 +403,6 @@ dirauth_options_pre_normalize(void *arg, char **msg_out)
"AuthDirGuardBWGuarantee", msg_out) < 0)
return -1;
- if (options->MinUptimeHidServDirectoryV2 < 0) {
- log_warn(LD_CONFIG, "MinUptimeHidServDirectoryV2 option must be at "
- "least 0 seconds. Changing to 0.");
- options->MinUptimeHidServDirectoryV2 = 0;
- }
-
return 0;
}
@@ -437,9 +431,7 @@ dirauth_options_validate(const void *arg, char **msg)
t = format_recommended_version_list(options->RecommendedServerVersions, 1);
tor_free(t);
- if (options->TestingAuthDirTimeToLearnReachability < 0) {
- REJECT("TestingAuthDirTimeToLearnReachability must be non-negative.");
- } else if (options->TestingAuthDirTimeToLearnReachability > 2*60*60) {
+ if (options->TestingAuthDirTimeToLearnReachability > 2*60*60) {
COMPLAIN("TestingAuthDirTimeToLearnReachability is insanely high.");
}