Skip to content
Snippets Groups Projects
Commit c7f1b46a authored by David Goulet's avatar David Goulet :panda_face:
Browse files

Perform cache lookup when FetchHidServDescriptors is set


The FetchHidServDescriptors check was placed before the descriptor cache
lookup which made the option not working because it was never using the
cache in the first place.

Fixes #18704

Patched-by: twim
Signef-off-by: David Goulet's avatarDavid Goulet <dgoulet@torproject.org>
parent 657067ef
No related branches found
No related tags found
No related merge requests found
o Major bugfixes (hidden service client)
- With FetchHidServDescriptors set to 0, there is no descriptor fetch
(which is intended) but also no descriptor cache lookup was done
making any Tor client not working with this option unset. Resolves
ticket #18704. Patch by "twim"; Bugfix on tor-0.2.0.20-rc.
......@@ -895,12 +895,6 @@ rend_client_refetch_v2_renddesc(rend_data_t *rend_query)
rend_cache_entry_t *e = NULL;
tor_assert(rend_query);
/* Are we configured to fetch descriptors? */
if (!get_options()->FetchHidServDescriptors) {
log_warn(LD_REND, "We received an onion address for a v2 rendezvous "
"service descriptor, but are not fetching service descriptors.");
return;
}
/* Before fetching, check if we already have a usable descriptor here. */
if (rend_cache_lookup_entry(rend_query->onion_address, -1, &e) == 0 &&
rend_client_any_intro_points_usable(e)) {
......@@ -908,6 +902,12 @@ rend_client_refetch_v2_renddesc(rend_data_t *rend_query)
"already have a usable descriptor here. Not fetching.");
return;
}
/* Are we configured to fetch descriptors? */
if (!get_options()->FetchHidServDescriptors) {
log_warn(LD_REND, "We received an onion address for a v2 rendezvous "
"service descriptor, but are not fetching service descriptors.");
return;
}
log_debug(LD_REND, "Fetching v2 rendezvous descriptor for service %s",
safe_str_client(rend_query->onion_address));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment