mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-26 07:31:33 +01:00
hs: Set rendezvous circuit timestamp_dirty all the time
We used to check if it was set to 0 which is what unused circuit have but when the rendezvous circuit was cannibalized, the timestamp_dirty is not 0 but we still need to reset it so we can actually use it without having the chance of expiring the next second (or very soon). Fixes #23123 Signed-off-by: David Goulet <dgoulet@torproject.org>
This commit is contained in:
parent
209bfe715c
commit
a52a32c855
2 changed files with 8 additions and 6 deletions
|
@ -2590,9 +2590,10 @@ service_rendezvous_circ_has_opened(origin_circuit_t *circ)
|
||||||
tor_assert(circ->hs_ident);
|
tor_assert(circ->hs_ident);
|
||||||
tor_assert(TO_CIRCUIT(circ)->purpose == CIRCUIT_PURPOSE_S_CONNECT_REND);
|
tor_assert(TO_CIRCUIT(circ)->purpose == CIRCUIT_PURPOSE_S_CONNECT_REND);
|
||||||
|
|
||||||
/* Declare the circuit dirty to avoid reuse, and for path-bias */
|
/* Declare the circuit dirty to avoid reuse, and for path-bias. We set the
|
||||||
if (!TO_CIRCUIT(circ)->timestamp_dirty)
|
* timestamp regardless of its content because that circuit could have been
|
||||||
TO_CIRCUIT(circ)->timestamp_dirty = time(NULL);
|
* cannibalized so in any cases, we are about to use that circuit more. */
|
||||||
|
TO_CIRCUIT(circ)->timestamp_dirty = time(NULL);
|
||||||
pathbias_count_use_attempt(circ);
|
pathbias_count_use_attempt(circ);
|
||||||
|
|
||||||
/* Get the corresponding service and intro point. */
|
/* Get the corresponding service and intro point. */
|
||||||
|
|
|
@ -3332,9 +3332,10 @@ rend_service_rendezvous_has_opened(origin_circuit_t *circuit)
|
||||||
NULL);
|
NULL);
|
||||||
rend_cookie = circuit->rend_data->rend_cookie;
|
rend_cookie = circuit->rend_data->rend_cookie;
|
||||||
|
|
||||||
/* Declare the circuit dirty to avoid reuse, and for path-bias */
|
/* Declare the circuit dirty to avoid reuse, and for path-bias. We set the
|
||||||
if (!circuit->base_.timestamp_dirty)
|
* timestamp regardless of its content because that circuit could have been
|
||||||
circuit->base_.timestamp_dirty = time(NULL);
|
* cannibalized so in any cases, we are about to use that circuit more. */
|
||||||
|
circuit->base_.timestamp_dirty = time(NULL);
|
||||||
|
|
||||||
/* This may be redundant */
|
/* This may be redundant */
|
||||||
pathbias_count_use_attempt(circuit);
|
pathbias_count_use_attempt(circuit);
|
||||||
|
|
Loading…
Add table
Reference in a new issue