summaryrefslogtreecommitdiff
path: root/src/feature
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2018-09-19 10:56:15 -0400
committerDavid Goulet <dgoulet@torproject.org>2018-09-19 11:11:57 -0400
commitf4f809fe3dc45ce72b4ccfb891eb715a8b330675 (patch)
tree426b6c478f922044509582084ee6f855330bbccb /src/feature
parent119159677be14351ebcae647d3988f4f2fd9eb72 (diff)
downloadtor-f4f809fe3dc45ce72b4ccfb891eb715a8b330675.tar.gz
tor-f4f809fe3dc45ce72b4ccfb891eb715a8b330675.zip
hs-v3: Close all SOCKS request on descriptor failure
Client side, when a descriptor is finally fetched and stored in the cache, we then go over all pending SOCKS request for that descriptor. If it turns out that the intro points are unusable, we close the first SOCKS request but not the others for the same .onion. This commit makes it that we'll close all SOCKS requests so we don't let hanging the other ones. It also fixes another bug which is having a SOCKS connection in RENDDESC_WAIT state but with a descriptor in the cache. At some point, tor will expire the intro failure cache which will make that descriptor usable again. When retrying all SOCKS connection (retry_all_socks_conn_waiting_for_desc()), we won't end up in the code path where we have already the descriptor for a pending request causing a BUG(). Bottom line is that we should never have pending requests (waiting for a descriptor) with that descriptor in the cache (even if unusable). Fixees #27410. Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature')
-rw-r--r--src/feature/hs/hs_client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/feature/hs/hs_client.c b/src/feature/hs/hs_client.c
index a6384b87a3..fa7c78c8f9 100644
--- a/src/feature/hs/hs_client.c
+++ b/src/feature/hs/hs_client.c
@@ -1688,7 +1688,7 @@ hs_client_desc_has_arrived(const hs_ident_dir_conn_t *ident)
/* We are unable to use the descriptor so remove the directory request
* from the cache so the next connection can try again. */
note_connection_attempt_succeeded(edge_conn->hs_ident);
- goto end;
+ continue;
}
log_info(LD_REND, "Descriptor has arrived. Launching circuits.");