diff options
author | David Goulet <dgoulet@torproject.org> | 2024-03-14 17:41:54 +0000 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2024-03-14 17:41:54 +0000 |
commit | 2d19050ef9f2612aab826fe2973dd9fab1df8438 (patch) | |
tree | 97d752b194deff2e15880832af9e2948ddd0bd9a | |
parent | d1e8c7a60361f2553c1abb1ec1a1e6a1dbc73185 (diff) | |
parent | d2249616090306ff20dc87a7960efa038030f2e8 (diff) | |
download | tor-2d19050ef9f2612aab826fe2973dd9fab1df8438.tar.gz tor-2d19050ef9f2612aab826fe2973dd9fab1df8438.zip |
Merge branch 'testing-intro-rot' into 'main'
hs_service: don't force high intro point rotation for TestingTorNetwork
Closes #40922
See merge request tpo/core/tor!802
-rw-r--r-- | changes/bug40922 | 5 | ||||
-rw-r--r-- | src/feature/hs/hs_service.c | 17 |
2 files changed, 5 insertions, 17 deletions
diff --git a/changes/bug40922 b/changes/bug40922 new file mode 100644 index 0000000000..e47e4f1461 --- /dev/null +++ b/changes/bug40922 @@ -0,0 +1,5 @@ + o Minor bugfixes (testing): + - Enabling TestingTorNetwork no longer forces fast hidden service + intro point rotation. This reduces noise and errors when + using hidden services with TestingTorNetwork enabled. + Fixes bug 40922; bugfix on 0.3.2.1-alpha. diff --git a/src/feature/hs/hs_service.c b/src/feature/hs/hs_service.c index 3cc8c23e0b..6fa238e2b3 100644 --- a/src/feature/hs/hs_service.c +++ b/src/feature/hs/hs_service.c @@ -410,11 +410,6 @@ get_intro_point_max_introduce2(void) static int32_t get_intro_point_min_lifetime(void) { -#define MIN_INTRO_POINT_LIFETIME_TESTING 10 - if (get_options()->TestingTorNetwork) { - return MIN_INTRO_POINT_LIFETIME_TESTING; - } - /* The [0, 2147483647] range is quite large to accommodate anything we decide * in the future. */ return networkstatus_get_param(NULL, "hs_intro_min_lifetime", @@ -427,11 +422,6 @@ get_intro_point_min_lifetime(void) static int32_t get_intro_point_max_lifetime(void) { -#define MAX_INTRO_POINT_LIFETIME_TESTING 30 - if (get_options()->TestingTorNetwork) { - return MAX_INTRO_POINT_LIFETIME_TESTING; - } - /* The [0, 2147483647] range is quite large to accommodate anything we decide * in the future. */ return networkstatus_get_param(NULL, "hs_intro_max_lifetime", @@ -3039,13 +3029,6 @@ get_max_intro_circ_per_period(const hs_service_t *service) tor_assert(service->config.num_intro_points <= HS_CONFIG_V3_MAX_INTRO_POINTS); -/** For a testing network, allow to do it for the maximum amount so circuit - * creation and rotation and so on can actually be tested without limit. */ -#define MAX_INTRO_POINT_CIRCUIT_RETRIES_TESTING -1 - if (get_options()->TestingTorNetwork) { - return MAX_INTRO_POINT_CIRCUIT_RETRIES_TESTING; - } - num_wanted_ip = service->config.num_intro_points; /* The calculation is as follow. We have a number of intro points that we |