[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Bug 32040: Machine updates.



commit a4a0cb8d5506e967ea01700dad42bf39d69d27cc
Author: Mike Perry <mikeperry-git@xxxxxxxxxxxxxx>
Date:   Tue Jun 16 12:23:09 2020 -0500

    Bug 32040: Machine updates.
    
    Does not require protover update, since this is just client-side.
---
 src/core/or/circuitpadding_machines.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/core/or/circuitpadding_machines.c b/src/core/or/circuitpadding_machines.c
index 405af5061..1e6b580f5 100644
--- a/src/core/or/circuitpadding_machines.c
+++ b/src/core/or/circuitpadding_machines.c
@@ -102,9 +102,18 @@ circpad_machine_client_hide_intro_circuits(smartlist_t *machines_sl)
    * INTRO_MACHINE_MAXIMUM_PADDING cells, to match the "...(inbound data cells
    * continue)" portion of the trace (aka the rest of an HTTPS response body).
    */
+
+  /* Start the machine on fresh intro circs. */
   client_machine->conditions.apply_purpose_mask =
-    circpad_circ_purpose_to_mask(CIRCUIT_PURPOSE_C_INTRODUCE_ACK_WAIT)|
-    circpad_circ_purpose_to_mask(CIRCUIT_PURPOSE_C_INTRODUCE_ACKED)|
+    circpad_circ_purpose_to_mask(CIRCUIT_PURPOSE_C_INTRODUCE_ACK_WAIT);
+
+  /* If the client purpose changes back to CIRCUIT_PURPOSE_C_INTRODUCING,
+   * or transitions to CIRCUIT_PURPOSE_C_INTRODUCE_ACKED, keep the machine
+   * alive, but do not launch new machines for these purposes. Also
+   * keep the machine around if it is in the CIRCUIT_PADDING purpose
+   * (but do not try to take over other machines in that purpose). */
+  client_machine->conditions.keep_purpose_mask =
+    circpad_circ_purpose_to_mask(CIRCUIT_PURPOSE_C_INTRODUCE_ACKED) |
     circpad_circ_purpose_to_mask(CIRCUIT_PURPOSE_C_CIRCUIT_PADDING);
 
   /* Keep the circuit alive even after the introduction has been finished,



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits