[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Detect when v2 services get disabled after HUP.



commit 5dc00c06615ef1e99e1d82dfdf41823c0d4bf7f6
Author: George Kadianakis <desnacked@xxxxxxxxxx>
Date:   Tue May 8 18:07:08 2018 +0300

    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.
---
 src/or/rendservice.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index 2c5c5840a..fed8c97eb 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



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits