diff options
author | teor <teor@torproject.org> | 2019-10-25 09:42:14 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-10-25 09:42:14 +1000 |
commit | c00602cc34548655a6f89ee10f23329a0131805d (patch) | |
tree | 778ab2169691cc8780c23ef46bad99433dd4a412 /src | |
parent | 68e1ced607eaed3105b4b3967e2f6af5070da0e4 (diff) | |
parent | acd27f4b419907052d0677933fe5068a5c25953f (diff) | |
download | tor-c00602cc34548655a6f89ee10f23329a0131805d.tar.gz tor-c00602cc34548655a6f89ee10f23329a0131805d.zip |
Merge branch 'maint-0.4.2'
Diffstat (limited to 'src')
-rw-r--r-- | src/feature/hs/hs_client.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/feature/hs/hs_client.c b/src/feature/hs/hs_client.c index 4ed34aa9af..c79bc63393 100644 --- a/src/feature/hs/hs_client.c +++ b/src/feature/hs/hs_client.c @@ -682,8 +682,12 @@ setup_intro_circ_auth_key(origin_circuit_t *circ) tor_assert(circ); desc = hs_cache_lookup_as_client(&circ->hs_ident->identity_pk); - if (BUG(desc == NULL)) { - /* Opening intro circuit without the descriptor is no good... */ + if (desc == NULL) { + /* There is a very small race window between the opening of this circuit + * and the client descriptor cache that gets purged (NEWNYM) or the + * cleaned up because it expired. Mark the circuit for close so a new + * descriptor fetch can occur. */ + circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_INTERNAL); goto end; } |