commit 8c18e9a949a76f53b7892739205bf29a8c020224
parent b93af906c444a71b52105c49239069adf680efad
Author: Alexander Færøy <ahf@torproject.org>
Date: Thu, 14 Oct 2021 19:19:32 +0000
Merge remote-tracking branch 'tor-gitlab/mr/459' into main
Diffstat:
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/changes/bug40486 b/changes/bug40486
@@ -0,0 +1,5 @@
+ o Code simplification and refactoring:
+ - Lower the official maximum for "guard-extreme-restriction-percent" to
+ 100. This has no effect on when the guard code will generate a warning,
+ but it makes the intent of the option clearer. Fixes bug 40486; bugfix
+ on 0.3.0.1-alpha.
diff --git a/src/feature/client/entrynodes.c b/src/feature/client/entrynodes.c
@@ -559,7 +559,7 @@ get_extreme_restriction_threshold(void)
int32_t pct = networkstatus_get_param(NULL,
"guard-extreme-restriction-percent",
DFLT_EXTREME_RESTRICTION_PERCENT,
- 1, INT32_MAX);
+ 1, 100);
return pct / 100.0;
}