]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Add a missing ! to directory_fetches_from_authorities
authorNick Mathewson <nickm@torproject.org>
Mon, 6 Dec 2010 16:36:01 +0000 (11:36 -0500)
committerNick Mathewson <nickm@torproject.org>
Mon, 6 Dec 2010 16:36:01 +0000 (11:36 -0500)
The old logic would have us fetch from authorities if we were refusing
unknown exits and our exit policy was reject*.  Instead, we want to
fetch from authorities if we're refusing unknown exits and our exit
policy is _NOT_ reject*.

Fixed by boboper.  Fixes more of 2097.  Bugfix on 0.2.2.16-alpha.

changes/bug2097-more [new file with mode: 0644]
src/or/dirserv.c

diff --git a/changes/bug2097-more b/changes/bug2097-more
new file mode 100644 (file)
index 0000000..52351cc
--- /dev/null
@@ -0,0 +1,6 @@
+  o Minor bugfixes:
+    - Fix a logic error in directory_fetches_from_authorities that
+      would cause all _non_-exits refusing single-hop-like circuits to
+      fetch from authorities, when we wanted to have _exits_ fetch
+      from authorities.  Fix by boboper; fixes more of 2097; bugfix on
+      0.2.2.16-alpha.
index 42d7d561ce96f0a9ed1b3ec36b3fe5181a060d3c..10b9000d51ed03f0bbe25c47fe29369f9ff648fc 100644 (file)
@@ -1160,7 +1160,7 @@ directory_fetches_from_authorities(or_options_t *options)
     return 0;
   if (server_mode(options) && router_pick_published_address(options, &addr)<0)
     return 1; /* we don't know our IP address; ask an authority. */
-  refuseunknown = router_my_exit_policy_is_reject_star() &&
+  refuseunknown = router_my_exit_policy_is_reject_star() &&
     should_refuse_unknown_exits(options);
   if (options->DirPort == 0 && !refuseunknown)
     return 0;