hs: Move and improve the service pruning code

First, this commit moves the code used to prune the service list when
reloading Tor (HUP signal for instance) to a function from
rend_config_services().

Second, fix bug #21054, improve the code by using the newly added
circuit_get_next_service_intro_circ() function instead of poking at the global
list directly and add _many_ more comments.

Fixes #21054.

Signed-off-by: David Goulet <dgoulet@torproject.org>
This commit is contained in:
David Goulet
2016-12-21 13:35:22 -05:00
parent 8a05e1a5d2
commit 36b5ca2c8b
2 changed files with 99 additions and 78 deletions
+5
View File
@@ -0,0 +1,5 @@
o Minor bugfixes (hidden service):
- Fix the config reload pruning of old vs new services so it actually
works when both ephemeral and non ephemeral services were configured
which lead to a BUG() stacktrace. Close #21054; Bugfix on
tor-0.3.0.1-alpha.