diff options
author | David Goulet <dgoulet@torproject.org> | 2017-01-17 14:53:06 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2017-01-17 14:58:50 -0500 |
commit | 1636777dc8386a4db67df3a3f1855afd8dacba34 (patch) | |
tree | a552d04c05fcacc1e4f46fbf8c14b3da07b4f1f1 /src/or/rendservice.c | |
parent | 92c3926479de1511dc4607fdc1f9b8fa0fa9f47b (diff) | |
download | tor-1636777dc8386a4db67df3a3f1855afd8dacba34.tar.gz tor-1636777dc8386a4db67df3a3f1855afd8dacba34.zip |
hs: Allow from 0 to MAX introduction points
An operator couldn't set the number of introduction point below the default
value which is 3. With this commit, from 0 to the hardcoded maximum is now
allowed.
Closes #21033
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/rendservice.c')
-rw-r--r-- | src/or/rendservice.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c index e423cb71ef..00f251588c 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -741,14 +741,12 @@ rend_config_services(const or_options_t *options, int validate_only) } else if (!strcasecmp(line->key, "HiddenServiceNumIntroductionPoints")) { service->n_intro_points_wanted = (unsigned int) tor_parse_long(line->value, 10, - NUM_INTRO_POINTS_DEFAULT, - NUM_INTRO_POINTS_MAX, &ok, NULL); + 0, NUM_INTRO_POINTS_MAX, &ok, NULL); if (!ok) { log_warn(LD_CONFIG, "HiddenServiceNumIntroductionPoints " "should be between %d and %d, not %s", - NUM_INTRO_POINTS_DEFAULT, NUM_INTRO_POINTS_MAX, - line->value); + 0, NUM_INTRO_POINTS_MAX, line->value); goto free_and_return; } log_info(LD_CONFIG, "HiddenServiceNumIntroductionPoints=%d for %s", |