aboutsummaryrefslogtreecommitdiff
path: root/src/or/rendservice.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2018-05-08 18:07:08 +0300
committerGeorge Kadianakis <desnacked@riseup.net>2018-05-09 11:25:00 +0300
commit5dc00c06615ef1e99e1d82dfdf41823c0d4bf7f6 (patch)
tree72bdbea0f04a5835770cfcae3f624101ce99d370 /src/or/rendservice.c
parent7c3f87eb4b2c3c4ce3422b3561bee36f3c9956c1 (diff)
downloadtor-5dc00c06615ef1e99e1d82dfdf41823c0d4bf7f6.tar.gz
tor-5dc00c06615ef1e99e1d82dfdf41823c0d4bf7f6.zip
Detect when v2 services get disabled after HUP.
During service configuration, rend_service_prune_list_impl_() sets rend_service_staging_list to NULL, which blocked pruning after a HUP. This patch initializes rend_service_staging_list when needed, so that HUP can detect disabled onion services. Fixes bug #25761.
Diffstat (limited to 'src/or/rendservice.c')
-rw-r--r--src/or/rendservice.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index 2c5c5840a1..fed8c97ebb 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -618,10 +618,11 @@ void
rend_service_prune_list(void)
{
smartlist_t *old_service_list = rend_service_list;
- /* Don't try to prune anything if we have no staging list. */
+
if (!rend_service_staging_list) {
- return;
+ rend_service_staging_list = smartlist_new();
}
+
rend_service_prune_list_impl_();
if (old_service_list) {
/* Every remaining service in the old list have been removed from the