]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Wait for busy authorities/fallbacks rather than ignoring excluded nodes
authorteor (Tim Wilson-Brown) <teor2345@gmail.com>
Mon, 14 Dec 2015 09:20:52 +0000 (20:20 +1100)
committerteor (Tim Wilson-Brown) <teor2345@gmail.com>
Tue, 15 Dec 2015 22:07:11 +0000 (09:07 +1100)
Applies the 6c443e987d fix to router_pick_directory_server_impl.

6c443e987d applied to directory servers chosen from the consensus,
and was:
"Tweak the 9969 fix a little

If we have busy nodes and excluded nodes, then don't retry with the
excluded ones enabled. Instead, wait for the busy ones to be nonbusy."

changes/feature17864 [new file with mode: 0644]
src/or/routerlist.c

diff --git a/changes/feature17864 b/changes/feature17864
new file mode 100644 (file)
index 0000000..1cf1562
--- /dev/null
@@ -0,0 +1,5 @@
+  o Minor feature (directory downloads):
+    - Wait for busy authorities and fallbacks to become non-busy when
+      bootstrapping. (A similar change was made in 6c443e987d for
+      directory servers chosen from the consensus.)
+      Closes ticket 17864; patch by "teor".
index 051bac5de5105fbc225288948fefe7914b250922..c45854c52f3931639764985daa7293612d9d4bda 100644 (file)
@@ -1739,22 +1739,24 @@ router_pick_trusteddirserver_impl(const smartlist_t *sourcelist,
       result = &selection->fake_status;
   }
 
-  if (n_busy_out)
-    *n_busy_out = n_busy;
-
   smartlist_free(direct);
   smartlist_free(tunnel);
   smartlist_free(overloaded_direct);
   smartlist_free(overloaded_tunnel);
 
-  if (result == NULL && try_excluding && !options->StrictNodes && n_excluded) {
+  if (result == NULL && try_excluding && !options->StrictNodes && n_excluded
+      && !n_busy) {
     /* If we got no result, and we are excluding nodes, and StrictNodes is
      * not set, try again without excluding nodes. */
     try_excluding = 0;
     n_excluded = 0;
+    n_busy = 0;
     goto retry_without_exclude;
   }
 
+  if (n_busy_out)
+    *n_busy_out = n_busy;
+
   return result;
 }