Commit 0d5a4392 authored by teor (Tim Wilson-Brown)'s avatar teor (Tim Wilson-Brown)
Browse files

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 5c51b3f1 released in 0.2.4.7-alpha.
Patch by "teor".
parent af80d472
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
  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
Original line number Diff line number Diff line
@@ -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;