[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r10176: backport r10175 (in tor/branches/tor-0_1_2-patches: . src/or)



Author: arma
Date: 2007-05-12 20:14:48 -0400 (Sat, 12 May 2007)
New Revision: 10176

Modified:
   tor/branches/tor-0_1_2-patches/ChangeLog
   tor/branches/tor-0_1_2-patches/src/or/routerlist.c
Log:
backport r10175


Modified: tor/branches/tor-0_1_2-patches/ChangeLog
===================================================================
--- tor/branches/tor-0_1_2-patches/ChangeLog	2007-05-12 23:22:27 UTC (rev 10175)
+++ tor/branches/tor-0_1_2-patches/ChangeLog	2007-05-13 00:14:48 UTC (rev 10176)
@@ -6,6 +6,9 @@
       behavior. (Reported by seeess, fixes bug 425.)
     - Fix a bug in dirserv_remove_invalid() that would cause authorities
       to corrupt memory under some really unlikely scenarios.
+    - If a directory authority is down, skip it when deciding where to get
+      networkstatus objects or descriptors. Otherwise we keep asking
+      every 10 seconds forever.
 
   o Minor bugfixes:
     - Actually set the purpose correctly for descriptors inserted with

Modified: tor/branches/tor-0_1_2-patches/src/or/routerlist.c
===================================================================
--- tor/branches/tor-0_1_2-patches/src/or/routerlist.c	2007-05-12 23:22:27 UTC (rev 10175)
+++ tor/branches/tor-0_1_2-patches/src/or/routerlist.c	2007-05-13 00:14:48 UTC (rev 10176)
@@ -4051,6 +4051,7 @@
   n_download = 0;
   SMARTLIST_FOREACH(networkstatus_list, networkstatus_t *, ns,
     {
+      trusted_dir_server_t *ds;
       smartlist_t *dl;
       dl = downloadable[ns_sl_idx] = smartlist_create();
       download_from[ns_sl_idx] = smartlist_create();
@@ -4064,6 +4065,13 @@
          * we take this clause out. -RD */
         continue;
       }
+
+      /* Don't try dirservers that we think are down -- we might have
+       * just tried them and just marked them as down. */
+      ds = router_get_trusteddirserver_by_digest(ns->identity_digest);
+      if (ds && !ds->is_running)
+        continue;
+
       SMARTLIST_FOREACH(ns->entries, routerstatus_t * , rs,
         {
           if (!rs->need_to_mirror)