tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit 28a76bd5a71df4afa3bd0ef444d30c01c79ad8cd
parent a009834155576356719c79512a73b1f9affacf7f
Author: Mike Perry <mikeperry-git@torproject.org>
Date:   Tue,  3 Jun 2025 19:57:07 +0000

Persist n_downloaded counter for lifetime of HS key.

Diffstat:
Msrc/feature/hs/hs_cache.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/feature/hs/hs_cache.c b/src/feature/hs/hs_cache.c @@ -191,8 +191,10 @@ cache_store_v3_as_dir(hs_cache_dir_descriptor_t *desc) goto err; } /* We now know that the descriptor we just received is a new one so + * preserve the downloaded counter from the old entry and then * remove the entry we currently have from our cache so we can then * store the new one. */ + desc->n_downloaded = cache_entry->n_downloaded; remove_v3_desc_as_dir(cache_entry); hs_cache_decrement_allocation(cache_get_dir_entry_size(cache_entry)); cache_dir_desc_free(cache_entry);