]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
hs: Allow from 0 to MAX introduction points
authorDavid Goulet <dgoulet@torproject.org>
Tue, 17 Jan 2017 19:53:06 +0000 (14:53 -0500)
committerDavid Goulet <dgoulet@torproject.org>
Tue, 17 Jan 2017 19:58:50 +0000 (14:58 -0500)
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>
changes/bug21033 [new file with mode: 0644]
src/or/rendservice.c

diff --git a/changes/bug21033 b/changes/bug21033
new file mode 100644 (file)
index 0000000..c4b3dea
--- /dev/null
@@ -0,0 +1,5 @@
+  o Minor bugfixes (hidden service):
+    - Restrict the number of introduction point from 0 to the maximum allowed
+      instead of the default value to the maximum. That was stopping operators
+      from using less than 3 introduction points. Closes #21033; bugfix on
+      tor-0.2.7.2-alpha.
index e423cb71ef64c2e67a1db8a9e0b75befbd0dccc5..00f251588cba0075c82aab94cc4587a62c043675 100644 (file)
@@ -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",