]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
hs: Fix a spurious warn in rend_log_intro_limit
authorDavid Goulet <dgoulet@torproject.org>
Fri, 21 Apr 2017 15:09:34 +0000 (11:09 -0400)
committerDavid Goulet <dgoulet@torproject.org>
Fri, 21 Apr 2017 15:09:34 +0000 (11:09 -0400)
We do dump HS stats now at log info everytime the intro circuit creation retry
period limit has been reached. However, the log was upgraded to warning if we
actually were over the elapsed time (plus an extra slop).

It is actually something that will happen in tor in normal case. For instance,
if the network goes down for 10 minutes then back up again making
have_completed_a_circuit() return false which results in never updating that
retry period marker for a service.

Fixes #22032

Signed-off-by: David Goulet <dgoulet@torproject.org>
src/or/rendservice.c

index 3c4b6775c0c965ced141c6ae9d95ebf8557910c6..c19c85f6a3abdddf0936047372e912fc3fb7c059 100644 (file)
@@ -1054,20 +1054,13 @@ rend_log_intro_limit(const rend_service_t *service, int min_severity)
   }
   time_t intro_period_elapsed = time(NULL) - service->intro_period_started;
   tor_assert_nonfatal(intro_period_elapsed >= 0);
-  /* We delayed resuming circuits longer than expected */
-  int exceeded_elapsed = (intro_period_elapsed > INTRO_CIRC_RETRY_PERIOD +
-                          INTRO_CIRC_RETRY_PERIOD_SLOP);
-  if (exceeded_elapsed) {
-    severity = LOG_WARN;
-  }
   log_fn(severity, LD_REND, "Hidden service %s %s %d intro points in the last "
-         "%d seconds%s. Intro circuit launches are limited to %d per %d "
+         "%d seconds. Intro circuit launches are limited to %d per %d "
          "seconds.",
          service->service_id,
          exceeded_limit ? "exceeded launch limit with" : "launched",
          service->n_intro_circuits_launched,
          (int)intro_period_elapsed,
-         exceeded_elapsed ? " (delayed)" : "",
          rend_max_intro_circs_per_period(service->n_intro_points_wanted),
          INTRO_CIRC_RETRY_PERIOD);
   rend_service_dump_stats(severity);