]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Mark fallback directoriess as too busy after a 503 response
authorteor (Tim Wilson-Brown) <teor2345@gmail.com>
Mon, 9 Nov 2015 22:47:48 +0000 (09:47 +1100)
committerteor (Tim Wilson-Brown) <teor2345@gmail.com>
Mon, 9 Nov 2015 22:47:48 +0000 (09:47 +1100)
Mark fallback directory mirrors as "too busy" when they return
a 503 response. Previously, the code just marked authorities as busy.

Unless clients set their own fallback directories, they will never see
this bug. (There are no default fallbacks yet.)

Fixes bug 17572; bugfix on 5c51b3f1f0d4 released in 0.2.4.7-alpha.
Patch by "teor".

changes/bug17572-fallback-by-digest [new file with mode: 0644]
src/or/routerlist.c

diff --git a/changes/bug17572-fallback-by-digest b/changes/bug17572-fallback-by-digest
new file mode 100644 (file)
index 0000000..3fba123
--- /dev/null
@@ -0,0 +1,5 @@
+  o Minor bugfix (fallback directories):
+    - Mark fallbacks as "too busy" when they return a 503 response,
+      rather than just marking authorities.
+      Fixes bug 17572; bugfix on 5c51b3f1f0d4 released in 0.2.4.7-alpha.
+      Patch by "teor".
index 694a148a5e16a9ef96f1c8e4cbe61feffffb40ec..8f6a440d1603b3b2b7d3c9972df02d2dca193902 100644 (file)
@@ -1363,10 +1363,10 @@ router_get_trusteddirserver_by_digest(const char *digest)
 dir_server_t *
 router_get_fallback_dirserver_by_digest(const char *digest)
 {
-  if (!trusted_dir_servers)
+  if (!fallback_dir_servers)
     return NULL;
 
-  SMARTLIST_FOREACH(trusted_dir_servers, dir_server_t *, ds,
+  SMARTLIST_FOREACH(fallback_dir_servers, dir_server_t *, ds,
      {
        if (tor_memeq(ds->digest, digest, DIGEST_LEN))
          return ds;