aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/circuitlist.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2018-10-12 09:22:30 -0400
committerDavid Goulet <dgoulet@torproject.org>2018-10-18 12:56:51 -0400
commit9ba16c4d03a39bcd369ccd59f6bfa351f4b527d5 (patch)
treea677d211b4bde397322f3eaa21393bea3332a146 /src/core/or/circuitlist.h
parenta5599fb71c51ddec47282164f71cfb06933096cc (diff)
downloadtor-9ba16c4d03a39bcd369ccd59f6bfa351f4b527d5.tar.gz
tor-9ba16c4d03a39bcd369ccd59f6bfa351f4b527d5.zip
hs-v3: Close client intro circuits if the descriptor is replaced
When storing a descriptor in the client cache, if we are about to replace an existing descriptor, make sure to close every introduction circuits of the old descriptor so we don't have leftovers lying around. Ticket 27471 describes a situation where tor is sending an INTRODUCE1 cell on an introduction circuit for which it doesn't have a matching intro point object (taken from the descriptor). The main theory is that, after a new descriptor showed up, the introduction points changed which led to selecting an introduction circuit not used by the service anymore thus for which we are unable to find the corresponding introduction point within the descriptor we just fetched. Closes #27471. Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/core/or/circuitlist.h')
-rw-r--r--src/core/or/circuitlist.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/or/circuitlist.h b/src/core/or/circuitlist.h
index dac11431c9..cb89d1820d 100644
--- a/src/core/or/circuitlist.h
+++ b/src/core/or/circuitlist.h
@@ -202,7 +202,8 @@ origin_circuit_t *circuit_get_ready_rend_circ_by_rend_data(
const rend_data_t *rend_data);
origin_circuit_t *circuit_get_next_by_pk_and_purpose(origin_circuit_t *start,
const uint8_t *digest, uint8_t purpose);
-origin_circuit_t *circuit_get_next_service_intro_circ(origin_circuit_t *start);
+origin_circuit_t *circuit_get_next_intro_circ(const origin_circuit_t *start,
+ bool want_client_circ);
origin_circuit_t *circuit_get_next_service_rp_circ(origin_circuit_t *start);
origin_circuit_t *circuit_get_next_service_hsdir_circ(origin_circuit_t *start);
origin_circuit_t *circuit_find_to_cannibalize(uint8_t purpose,