Browse Source

Merge remote-tracking branch 'tor-github/pr/1185'

Nick Mathewson 6 years ago
parent
commit
ab1f39322c
2 changed files with 4 additions and 3 deletions
  1. 3 0
      changes/bug31112
  2. 1 3
      src/core/or/circuitpadding_machines.c

+ 3 - 0
changes/bug31112

@@ -0,0 +1,3 @@
+  o Code simplification and refactoring:
+    - Various simplifications and minor improvements to the circuit padding
+      machines. Patch by Tobias Pulls. Closes tickets 31112 and 31098.

+ 1 - 3
src/core/or/circuitpadding_machines.c

@@ -155,7 +155,6 @@ circpad_machine_relay_hide_intro_circuits(smartlist_t *machines_sl)
   relay_machine->name = "relay_ip_circ";
 
   relay_machine->conditions.state_mask = CIRCPAD_CIRC_OPENED;
-  relay_machine->target_hopnum = 2;
 
   /* This is a relay-side machine */
   relay_machine->is_origin_side = 0;
@@ -387,7 +386,6 @@ circpad_machine_relay_hide_rend_circuits(smartlist_t *machines_sl)
   /* Only pad after the circuit has been built and pad to the middle */
   relay_machine->conditions.min_hops = 2;
   relay_machine->conditions.state_mask = CIRCPAD_CIRC_OPENED;
-  relay_machine->target_hopnum = 2;
 
   /* This is a relay-side machine */
   relay_machine->is_origin_side = 0;
@@ -408,7 +406,7 @@ circpad_machine_relay_hide_rend_circuits(smartlist_t *machines_sl)
   /* OBFUSCATE_CIRC_SETUP -> END transition when we send our first
    * padding packet and/or hit the state length (the state length is 1). */
   relay_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
-      next_state[CIRCPAD_EVENT_PADDING_RECV] = CIRCPAD_STATE_END;
+      next_state[CIRCPAD_EVENT_PADDING_SENT] = CIRCPAD_STATE_END;
   relay_machine->states[CIRCPAD_STATE_OBFUSCATE_CIRC_SETUP].
       next_state[CIRCPAD_EVENT_LENGTH_COUNT] = CIRCPAD_STATE_END;