[or-cvs] r11985: Correct and additional fix to bug 529. (in tor/trunk: . src/or)

nickm at seul.org nickm at seul.org
Tue Oct 16 14:25:17 UTC 2007


Author: nickm
Date: 2007-10-16 10:25:16 -0400 (Tue, 16 Oct 2007)
New Revision: 11985

Modified:
   tor/trunk/
   tor/trunk/src/or/networkstatus.c
Log:
 r15849 at catbus:  nickm | 2007-10-16 10:24:38 -0400
 Correct and additional fix to bug 529.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r15849] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/src/or/networkstatus.c
===================================================================
--- tor/trunk/src/or/networkstatus.c	2007-10-16 14:25:14 UTC (rev 11984)
+++ tor/trunk/src/or/networkstatus.c	2007-10-16 14:25:16 UTC (rev 11985)
@@ -1172,16 +1172,28 @@
       rs = smartlist_get(ns->routerstatus_list, idx);
     }
     if (r>0) {
-      /* We have no routerstatus for this router. Skip it. */
-      router->is_named = 0;
+      /* We have no routerstatus for this router. Clear flags and skip it. */
+      if (!authdir) {
+        router->is_named = 0;
+        if (router->purpose == ROUTER_PURPOSE_GENERAL) {
+          router->is_valid = router->is_running =
+            router->is_fast = router->is_stable =
+            router->is_possible_guard = router->is_exit =
+            router->is_bad_exit = 0;
+        }
+      }
       continue;
     }
     tor_assert(r==0);
 
     ds = router_get_trusteddirserver_by_digest(digest);
 
-    if (!namingdir)
-      router->is_named = rs->is_named;
+    if (!namingdir) {
+      if (rs->is_named && !strcasecmp(router->nickname, rs->nickname))
+        router->is_named = 1;
+      else
+        router->is_named = 0;
+    }
 
     if (!authdir) {
       /* If we're not an authdir, believe others. */
@@ -1192,10 +1204,6 @@
       router->is_possible_guard = rs->is_possible_guard;
       router->is_exit = rs->is_exit;
       router->is_bad_exit = rs->is_bad_exit;
-      if (rs->is_named && !strcasecmp(router->nickname, rs->nickname))
-        router->is_named = 1;
-      else
-        router->is_named = 0;
     }
     if (router->is_running && ds) {
       download_status_reset(&ds->v2_ns_dl_status);



More information about the tor-commits mailing list