]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Don't recreate descriptor on sighup
authorSebastian Hahn <sebastian@torproject.org>
Sat, 21 May 2011 17:10:11 +0000 (19:10 +0200)
committerRoger Dingledine <arma@torproject.org>
Sat, 21 May 2011 20:08:21 +0000 (16:08 -0400)
We used to regenerate our descriptor whenever we'd get a sighup. This
was caused by a bug in options_transition_affects_workers() that would
return true even if the options were exactly the same. Down the call
path we'd call init_keys(), which made us make a new descriptor which
the authorities would reject, and the node would subsequently fall out
of the consensus.

This patch fixes only the first part of this bug:
options_transition_affects_workers() behaves correctly now. The second
part still wants a fix.

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

diff --git a/changes/bug1810 b/changes/bug1810
new file mode 100644 (file)
index 0000000..11e561f
--- /dev/null
@@ -0,0 +1,6 @@
+  o Major bugfixes:
+    - Don't decide to make a new descriptor when receiving a HUP signal.
+      This bug has caused a lot of relays to disappear from the consensus
+      periodically. Fixes the most common case of triggering bug 1810;
+      bugfix on 0.2.2.7-alpha.
+
index 68a6b29f16da745a94d3e42faebfc2cfaa66104c..36fb991e3379afe3a5568c96094b9c6ef19f29c7 100644 (file)
@@ -3809,7 +3809,7 @@ options_transition_affects_workers(or_options_t *old_options,
       old_options->ORPort != new_options->ORPort ||
       old_options->ServerDNSSearchDomains !=
                                        new_options->ServerDNSSearchDomains ||
-      old_options->SafeLogging != new_options->SafeLogging ||
+      old_options->_SafeLogging != new_options->_SafeLogging ||
       old_options->ClientOnly != new_options->ClientOnly ||
       public_server_mode(old_options) != public_server_mode(new_options) ||
       !config_lines_eq(old_options->Logs, new_options->Logs) ||