Explorar el Código

Merge remote-tracking branch 'dgoulet/bug23123_032_01'

Nick Mathewson hace 6 años
padre
commit
9261f612ad
Se han modificado 2 ficheros con 8 adiciones y 6 borrados
  1. 4 3
      src/or/hs_service.c
  2. 4 3
      src/or/rendservice.c

+ 4 - 3
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. */

+ 4 - 3
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);