summaryrefslogtreecommitdiff
path: root/src/feature/hs/hs_client.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-09-21 13:02:12 -0400
committerNick Mathewson <nickm@torproject.org>2018-09-21 13:02:12 -0400
commitb7bd162af70ced68d3ea9d738c8cacb5bea75a1c (patch)
treee7e12d0bdb68f62303e5324fcf024999cbf84359 /src/feature/hs/hs_client.c
parentdbc32400d54300b5011c1d129717214be3a44696 (diff)
parent79265a6fb606e416529f5a1dd31c94f15edec91b (diff)
downloadtor-b7bd162af70ced68d3ea9d738c8cacb5bea75a1c.tar.gz
tor-b7bd162af70ced68d3ea9d738c8cacb5bea75a1c.zip
Merge remote-tracking branch 'dgoulet/ticket27774_035_03'
Diffstat (limited to 'src/feature/hs/hs_client.c')
-rw-r--r--src/feature/hs/hs_client.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/feature/hs/hs_client.c b/src/feature/hs/hs_client.c
index 563f6c6b3b..52a4e9a007 100644
--- a/src/feature/hs/hs_client.c
+++ b/src/feature/hs/hs_client.c
@@ -576,10 +576,21 @@ send_introduce1(origin_circuit_t *intro_circ,
/* Send the INTRODUCE1 cell. */
if (hs_circ_send_introduce1(intro_circ, rend_circ, ip,
desc->subcredential) < 0) {
- /* Unable to send the cell, the intro circuit has been marked for close so
- * this is a permanent error. */
- tor_assert_nonfatal(TO_CIRCUIT(intro_circ)->marked_for_close);
- goto perm_err;
+ if (TO_CIRCUIT(intro_circ)->marked_for_close) {
+ /* If the introduction circuit was closed, we were unable to send the
+ * cell for some reasons. In any case, the intro circuit has to be
+ * closed by the above function. We'll return a transient error so tor
+ * can recover and pick a new intro point. To avoid picking that same
+ * intro point, we'll note down the intro point failure so it doesn't
+ * get reused. */
+ hs_cache_client_intro_state_note(service_identity_pk,
+ &intro_circ->hs_ident->intro_auth_pk,
+ INTRO_POINT_FAILURE_GENERIC);
+ }
+ /* It is also possible that the rendezvous circuit was closed due to being
+ * unable to use the rendezvous point node_t so in that case, we also want
+ * to recover and let tor pick a new one. */
+ goto tran_err;
}
/* Cell has been sent successfully. Copy the introduction point