]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Revert "Remove obsolete workaround in dirserv_thinks_router_is_hs_dir()"
authorDavid Goulet <dgoulet@ev0ke.net>
Tue, 28 Apr 2015 18:22:49 +0000 (14:22 -0400)
committerDavid Goulet <dgoulet@ev0ke.net>
Tue, 28 Apr 2015 18:30:07 +0000 (14:30 -0400)
Fixes #15850, part of #15801. Change file is added by this commit. The
original comment in the reverted commit is removed because right now we
*need* a DirPort until #15849 is implemented so no doubt nor confusion there
anymore.

This reverts commit 80bed1ac96a3035f8c55ddced5528f0d7d16d386.

Signed-off-by: David Goulet <dgoulet@ev0ke.net>
changes/bug15850 [new file with mode: 0644]
src/or/dirserv.c

diff --git a/changes/bug15850 b/changes/bug15850
new file mode 100644 (file)
index 0000000..48a7c7b
--- /dev/null
@@ -0,0 +1,4 @@
+  o Major bugfix
+    - Revert commit that made directory authority assign the HSDir flag to
+      relay without a DirPort which is bad because relay can't handle
+      BEGIN_DIR cells. Fixes #15850. Bugfix on tor-0.2.6.3-alpha;
index e5a5b5430301e7b018d58fd32d954198b176fb93..a024be8342e4e1ebd893ca3acdb44381d6d094af 100644 (file)
@@ -1305,7 +1305,7 @@ dirserv_thinks_router_is_hs_dir(const routerinfo_t *router,
   else
     uptime = real_uptime(router, now);
 
-  return (router->wants_to_be_hs_dir &&
+  return (router->wants_to_be_hs_dir && router->dir_port &&
           uptime >= get_options()->MinUptimeHidServDirectoryV2 &&
           router_is_active(router, node, now));
 }