diff options
author | David Goulet <dgoulet@torproject.org> | 2017-10-04 16:22:49 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-10-31 12:14:11 -0400 |
commit | 5dbcd48f0ee2f57557f6bcce6ee3ec11a76727e4 (patch) | |
tree | 72f3357325a41bef64b6ed18c5403a530c1155f2 /src/or/connection_edge.c | |
parent | 469ee6e6fe0dbc9bb7b3c8ceed8aa7c494fd4ac3 (diff) | |
download | tor-5dbcd48f0ee2f57557f6bcce6ee3ec11a76727e4.tar.gz tor-5dbcd48f0ee2f57557f6bcce6ee3ec11a76727e4.zip |
hs-v3: Attempt descriptor refetch when dirinfo changes
When the directory information changes, callback to the HS client subsystem so
it can check if any pending SOCKS connections are waiting for a descriptor. If
yes, attempt a refetch for those.
Fixes #23762
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r-- | src/or/connection_edge.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 77dac62b09..b9d8eeaff6 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -1571,10 +1571,10 @@ connection_ap_handle_onion(entry_connection_t *conn, int ret = hs_client_refetch_hsdesc(&edge_conn->hs_ident->identity_pk); switch (ret) { case HS_CLIENT_FETCH_MISSING_INFO: - /* By going to the end, the connection is put in waiting for a circuit - * state which means that it will be retried and consider as a pending - * connection. */ - goto end; + /* Keeping the connection in descriptor wait state is fine because + * once we get enough dirinfo or a new live consensus, the HS client + * subsystem is notified and every connection in that state will + * trigger a fetch for the service key. */ case HS_CLIENT_FETCH_LAUNCHED: case HS_CLIENT_FETCH_PENDING: case HS_CLIENT_FETCH_HAVE_DESC: @@ -1591,7 +1591,6 @@ connection_ap_handle_onion(entry_connection_t *conn, /* We have the descriptor! So launch a connection to the HS. */ log_info(LD_REND, "Descriptor is here. Great."); - end: base_conn->state = AP_CONN_STATE_CIRCUIT_WAIT; /* We'll try to attach it at the next event loop, or whenever * we call connection_ap_attach_pending() */ |