mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 12:23:32 +01:00
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.
This commit is contained in:
parent
7c3f87eb4b
commit
5dc00c0661
@ -618,10 +618,11 @@ void
|
|||||||
rend_service_prune_list(void)
|
rend_service_prune_list(void)
|
||||||
{
|
{
|
||||||
smartlist_t *old_service_list = rend_service_list;
|
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) {
|
if (!rend_service_staging_list) {
|
||||||
return;
|
rend_service_staging_list = smartlist_new();
|
||||||
}
|
}
|
||||||
|
|
||||||
rend_service_prune_list_impl_();
|
rend_service_prune_list_impl_();
|
||||||
if (old_service_list) {
|
if (old_service_list) {
|
||||||
/* Every remaining service in the old list have been removed from the
|
/* Every remaining service in the old list have been removed from the
|
||||||
|
Loading…
Reference in New Issue
Block a user