mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-25 23:21:38 +01:00
hs: Update intro circuit timestamp when re-extending
A client can re-extend up to 3 intro points on the same circuit. This happens when we get NACKed by the intro point for which we choose a new intro and re-extend the circuit to it. That process can be arbitrarly long so reset the dirty timestamp of the circuit everytime we choose to re-extend so we get a bit more time to actually do our introduction. This is a client circuit so it is short live once opened thus giving us a bit more time to complete the introduction is ok. Signed-off-by: David Goulet <dgoulet@torproject.org>
This commit is contained in:
parent
1077e9894c
commit
a112562544
1 changed files with 7 additions and 0 deletions
|
@ -1195,6 +1195,13 @@ hs_client_reextend_intro_circuit(origin_circuit_t *circ)
|
||||||
(unsigned int) TO_CIRCUIT(circ)->n_circ_id,
|
(unsigned int) TO_CIRCUIT(circ)->n_circ_id,
|
||||||
safe_str_client(extend_info_describe(ei)));
|
safe_str_client(extend_info_describe(ei)));
|
||||||
ret = circuit_extend_to_new_exit(circ, ei);
|
ret = circuit_extend_to_new_exit(circ, ei);
|
||||||
|
if (ret == 0) {
|
||||||
|
/* We were able to extend so update the timestamp so we avoid expiring
|
||||||
|
* this circuit too early. The intro circuit is short live so the
|
||||||
|
* linkability issue is minimized, we just need the circuit to hold a
|
||||||
|
* bit longer so we can introduce. */
|
||||||
|
TO_CIRCUIT(circ)->timestamp_dirty = time(NULL);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
log_info(LD_REND, "Closing intro circ %u (out of RELAY_EARLY cells).",
|
log_info(LD_REND, "Closing intro circ %u (out of RELAY_EARLY cells).",
|
||||||
(unsigned int) TO_CIRCUIT(circ)->n_circ_id);
|
(unsigned int) TO_CIRCUIT(circ)->n_circ_id);
|
||||||
|
|
Loading…
Add table
Reference in a new issue