浏览代码

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".
teor (Tim Wilson-Brown) 8 年之前
父节点
当前提交
0d5a439292
共有 2 个文件被更改,包括 7 次插入2 次删除
  1. 5 0
      changes/bug17572-fallback-by-digest
  2. 2 2
      src/or/routerlist.c

+ 5 - 0
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".

+ 2 - 2
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;