]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Detect when v2 services get disabled after HUP.
authorGeorge Kadianakis <desnacked@riseup.net>
Tue, 8 May 2018 15:07:08 +0000 (18:07 +0300)
committerGeorge Kadianakis <desnacked@riseup.net>
Wed, 9 May 2018 08:25:00 +0000 (11:25 +0300)
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.

src/or/rendservice.c

index 2c5c5840a13bf1f53fe2e766349ad1688bcccb02..fed8c97ebbdc4ff3f51cad3ee8409ae1f7d4a63d 100644 (file)
@@ -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