aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-09-06 14:17:43 -0400
committerNick Mathewson <nickm@torproject.org>2017-09-06 14:17:43 -0400
commit9261f612ad7ea66580bc5f95d9c9b609e125da3a (patch)
tree0c0c219e75d71db862b3ab363910dfa1f51d0596 /src
parentb268dca41175fe438441d3e4137766efee30da35 (diff)
parenta52a32c855b2ed59cb915ad687d80f1294c6f0a3 (diff)
downloadtor-9261f612ad7ea66580bc5f95d9c9b609e125da3a.tar.gz
tor-9261f612ad7ea66580bc5f95d9c9b609e125da3a.zip
Merge remote-tracking branch 'dgoulet/bug23123_032_01'
Diffstat (limited to 'src')
-rw-r--r--src/or/hs_service.c7
-rw-r--r--src/or/rendservice.c7
2 files changed, 8 insertions, 6 deletions
diff --git a/src/or/hs_service.c b/src/or/hs_service.c
index 796efa0c9b..706890e34f 100644
--- a/src/or/hs_service.c
+++ b/src/or/hs_service.c
@@ -2588,9 +2588,10 @@ service_rendezvous_circ_has_opened(origin_circuit_t *circ)
tor_assert(circ->hs_ident);
tor_assert(TO_CIRCUIT(circ)->purpose == CIRCUIT_PURPOSE_S_CONNECT_REND);
- /* Declare the circuit dirty to avoid reuse, and for path-bias */
- if (!TO_CIRCUIT(circ)->timestamp_dirty)
- TO_CIRCUIT(circ)->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. */
+ TO_CIRCUIT(circ)->timestamp_dirty = time(NULL);
pathbias_count_use_attempt(circ);
/* Get the corresponding service and intro point. */
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);