From 3519d0c8086edeade8d550f230caa3f95e4d2cdb Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 23 Mar 2018 11:31:56 -0400 Subject: [PATCH] Clear all control.c flags on control_free_all() Fixes bug 25512. --- changes/bug25512 | 5 +++++ src/or/control.c | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 changes/bug25512 diff --git a/changes/bug25512 b/changes/bug25512 new file mode 100644 index 0000000000..4b6491867e --- /dev/null +++ b/changes/bug25512 @@ -0,0 +1,5 @@ + o Minor bugfixes (restart-in-process): + - When shutting down, Tor now clears all the flags in the control.c + module. This should prevent a bug where authentication cookies + are not generated on restart. Fixes bug 25512; bugfix on 0.3.3.1-alpha. + diff --git a/src/or/control.c b/src/or/control.c index 7786e16481..edbc2f70fb 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -7602,6 +7602,11 @@ control_free_all(void) bootstrap_percent = BOOTSTRAP_STATUS_UNDEF; notice_bootstrap_percent = 0; bootstrap_problems = 0; + authentication_cookie_is_set = 0; + global_event_mask = 0; + disable_log_messages = 0; + memset(last_sent_bootstrap_message, 0, sizeof(last_sent_bootstrap_message)); + flush_queued_event_pending = 0; } #ifdef TOR_UNIT_TESTS