tor/changes/bug22159
David Goulet 6507ecb7e8 hs: Fix the intro circuit max retry
Some parentheses were missing making the rend_max_intro_circs_per_period()
return a lower value than it was suppose to.

The calculation is that a service at most will open a number of intro points
that it wants which is 3 by default or HiddenServiceNumIntroductionPoints. Two
extra are launched for performance reason. Finally, this can happen twice for
two descriptors for the current and next time period.

From:
  2 * n_intro_wanted + 2

...which resulted in 8 for 3 intro points, this commit fixes it to:

  (n_intro_wanted + 2) * 2

... resulting in 12 possible intro point circuit which is the correct maximum
intro circuit allowed per period.

Last, this commit rate limits the the log message if we ever go above that
limit else over a INTRO_CIRC_RETRY_PERIOD, we can print it often!

Fixes #22159

Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-28 14:43:42 -04:00

8 lines
432 B
Plaintext

o Minor bugfixes (hidden service):
- A service is allowed to open a maximum number of circuits for a specific
period of time. That value was lower than it should be (8 vs 12) in the
normal case of 3 introduction points. Fixes bug 22159.; bugfix on
tor-0.3.0.5-rc.
- Rate limit the log if we ever go above the maximum number of allowed
intro circuits. Fixes bug 22159.; bugfix on tor-0.3.1.1-alpha.