]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix an assert when disabling ORPort with accounting disabled.
authorNick Mathewson <nickm@torproject.org>
Wed, 18 Sep 2013 14:26:32 +0000 (10:26 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 18 Sep 2013 14:26:32 +0000 (10:26 -0400)
The problem was that the server_identity_key_is_set() function could
return true under conditions where we don't really have an identity
key -- specifically, where we used to have one, but we stopped being a
server.

This is a fix for 6979; bugfix on 0.2.2.18-alpha where we added that
assertion to get_server_identity_key().

changes/bug6979 [new file with mode: 0644]
src/or/router.c

diff --git a/changes/bug6979 b/changes/bug6979
new file mode 100644 (file)
index 0000000..55572ec
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor bugfixes:
+    - Fix an assertion failure that would occur when disabling the
+      ORPort setting on a running Tor process while accounting was
+      enabled. Fixes bug 6979; bugfix on 0.2.2.18-alpha.
index 1ace8e249216a8b623f04d26a5c0d3ad618f48b8..a3459aec71f216fd4d1c69a948e2b374482588e3 100644 (file)
@@ -177,7 +177,7 @@ get_server_identity_key(void)
 int
 server_identity_key_is_set(void)
 {
-  return server_identitykey != NULL;
+  return server_mode(get_options()) && server_identitykey != NULL;
 }
 
 /** Set the current client identity key to <b>k</b>.