[tor-commits] [tor/master] Mark fallback directoriess as too busy after a 503 response

nickm at torproject.org nickm at torproject.org
Tue Nov 10 01:18:07 UTC 2015


commit 0d5a439292a7837033afb733221b1f3b1f641b5f
Author: teor (Tim Wilson-Brown) <teor2345 at gmail.com>
Date:   Tue Nov 10 09:47:48 2015 +1100

    Mark fallback directoriess as too busy after a 503 response
    
    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 |    5 +++++
 src/or/routerlist.c                 |    4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/changes/bug17572-fallback-by-digest b/changes/bug17572-fallback-by-digest
new file mode 100644
index 0000000..3fba123
--- /dev/null
+++ b/changes/bug17572-fallback-by-digest
@@ -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".
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 694a148..8f6a440 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -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;



More information about the tor-commits mailing list