aboutsummaryrefslogtreecommitdiff
path: root/src/or/rendservice.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2017-08-31 11:40:22 -0400
committerDavid Goulet <dgoulet@torproject.org>2017-08-31 11:40:22 -0400
commita52a32c855b2ed59cb915ad687d80f1294c6f0a3 (patch)
tree1fc2ddc33e226da3a681c1370c602dd7127a0ad5 /src/or/rendservice.c
parent209bfe715cc8c1c59b2578c406749a0d4a5bd8cb (diff)
downloadtor-a52a32c855b2ed59cb915ad687d80f1294c6f0a3.tar.gz
tor-a52a32c855b2ed59cb915ad687d80f1294c6f0a3.zip
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>
Diffstat (limited to 'src/or/rendservice.c')
-rw-r--r--src/or/rendservice.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index c17d77f970..9edb7cc4b7 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -3332,9 +3332,10 @@ rend_service_rendezvous_has_opened(origin_circuit_t *circuit)
NULL);
rend_cookie = circuit->rend_data->rend_cookie;
- /* Declare the circuit dirty to avoid reuse, and for path-bias */
- if (!circuit->base_.timestamp_dirty)
- circuit->base_.timestamp_dirty = time(NULL);
+ /* Declare the circuit dirty to avoid reuse, and for path-bias. We set the
+ * timestamp regardless of its content because that circuit could have been
+ * cannibalized so in any cases, we are about to use that circuit more. */
+ circuit->base_.timestamp_dirty = time(NULL);
/* This may be redundant */
pathbias_count_use_attempt(circuit);