diff options
author | David Goulet <dgoulet@torproject.org> | 2019-06-19 09:22:07 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2019-06-19 09:22:07 -0400 |
commit | 87511766873fd22ebeff1bc9dcfa78773a890083 (patch) | |
tree | d65cc06df881c80965aea31c61510fc8f93a2ee2 /src/feature/hs/hs_cache.c | |
parent | 91c7d395cf7c62f8ccf3261132cb5d71972f79ae (diff) | |
download | tor-87511766873fd22ebeff1bc9dcfa78773a890083.tar.gz tor-87511766873fd22ebeff1bc9dcfa78773a890083.zip |
hs-v3: Close intro circuits when cleaning client cache
Fixes #30921
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/hs/hs_cache.c')
-rw-r--r-- | src/feature/hs/hs_cache.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/feature/hs/hs_cache.c b/src/feature/hs/hs_cache.c index 05f9940ae6..9817113b23 100644 --- a/src/feature/hs/hs_cache.c +++ b/src/feature/hs/hs_cache.c @@ -710,6 +710,11 @@ cache_clean_v3_as_client(time_t now) MAP_DEL_CURRENT(key); entry_size = cache_get_client_entry_size(entry); bytes_removed += entry_size; + /* We just removed an old descriptor. We need to close all intro circuits + * so we don't have leftovers that can be selected while lacking a + * descriptor. We leave the rendezvous circuits opened because they could + * be in use. */ + hs_client_close_intro_circuits_from_desc(entry->desc); /* Entry is not in the cache anymore, destroy it. */ cache_client_desc_free(entry); /* Update our OOM. We didn't use the remove() function because we are in |