]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Make changes in server_mode() affect workers; fix a crash.
authorNick Mathewson <nickm@torproject.org>
Mon, 2 Oct 2017 15:11:30 +0000 (11:11 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 2 Oct 2017 15:11:30 +0000 (11:11 -0400)
Without this fix, changes from client to bridge don't trigger
transition_affects_workers(), so we would never have actually
initialized the cpuworkers.

Fixes bug 23693.  Bugfix on 3bcdb26267502e0 0.2.6.3-alpha, which
fixed bug 14901 in the general case, but not on the case where
public_server_mode() did not change.

changes/bug23693 [new file with mode: 0644]
src/or/config.c

diff --git a/changes/bug23693 b/changes/bug23693
new file mode 100644 (file)
index 0000000..796398b
--- /dev/null
@@ -0,0 +1,6 @@
+  o Minor bugfixes (relay, crash):
+    - Avoid a crash when transitioning from client mode to bridge mode.
+      Previously, we would launch the worker threads whenever our "public
+      server" mode changed, but not when our "server" mode changed.
+      Fixes bug 23693; bugfix on 0.2.6.3-alpha.
+
index 2e001ee5ab54cd487cd4d046d8fe78705339e346..23c566c6ca67330a8a600012802143fa5fc1b1fb 100644 (file)
@@ -4453,6 +4453,7 @@ options_transition_affects_workers(const or_options_t *old_options,
                                        new_options->ServerDNSSearchDomains ||
       old_options->SafeLogging_ != new_options->SafeLogging_ ||
       old_options->ClientOnly != new_options->ClientOnly ||
+      server_mode(old_options) != server_mode(new_options) ||
       public_server_mode(old_options) != public_server_mode(new_options) ||
       !config_lines_eq(old_options->Logs, new_options->Logs) ||
       old_options->LogMessageDomains != new_options->LogMessageDomains)