[tor-commits] [tor/master] Set is_padding_timer_scheduled to 0

nickm at torproject.org nickm at torproject.org
Wed Oct 21 11:45:01 UTC 2020


commit 0668437b5895c2a870f38557b4f432ebade07e8d
Author: Guinness <guinness at crans.org>
Date:   Tue Oct 20 21:04:33 2020 +0200

    Set is_padding_timer_scheduled to 0
    
    When calling `circpad_send_padding_cell_for_callback()`, the flag
    `is_padding_timer_scheduled` was not resetted to 0 which caused an issue
    in the circpad simulator.
    This commit fixes this problem.
    
    Fixes #32671.
---
 changes/bug32671             | 4 ++++
 src/core/or/circuitpadding.c | 1 +
 2 files changed, 5 insertions(+)

diff --git a/changes/bug32671 b/changes/bug32671
new file mode 100644
index 0000000000..d12e35c7fc
--- /dev/null
+++ b/changes/bug32671
@@ -0,0 +1,4 @@
+  o Minor bugfixes (circuit padding):
+    - When circpad_send_padding_cell_for_callback is called,
+      `is_padding_timer_scheduled` flag was not reset. Now it is set to 0 at
+      the top of that function. Fix bug #32671.
diff --git a/src/core/or/circuitpadding.c b/src/core/or/circuitpadding.c
index 889ffb03f1..e6daba5469 100644
--- a/src/core/or/circuitpadding.c
+++ b/src/core/or/circuitpadding.c
@@ -1226,6 +1226,7 @@ circpad_send_padding_cell_for_callback(circpad_machine_runtime_t *mi)
   circuit_t *circ = mi->on_circ;
   int machine_idx = mi->machine_index;
   mi->padding_scheduled_at_usec = 0;
+  mi->is_padding_timer_scheduled = 0;
   circpad_statenum_t state = mi->current_state;
 
   /* Make sure circuit didn't close on us */





More information about the tor-commits mailing list