[or-cvs] let an authdir that"s not a naming authdir start even

arma at seul.org arma at seul.org
Sat Mar 18 00:22:25 UTC 2006


Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or

Modified Files:
	circuitbuild.c dirserv.c routerlist.c 
Log Message:
let an authdir that's not a naming authdir start even
if it doesn't have an approved-routers file. if it does,
read it and parse it as usual.


Index: circuitbuild.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/circuitbuild.c,v
retrieving revision 1.224
retrieving revision 1.225
diff -u -p -d -r1.224 -r1.225
--- circuitbuild.c	17 Mar 2006 19:25:36 -0000	1.224
+++ circuitbuild.c	18 Mar 2006 00:22:23 -0000	1.225
@@ -996,8 +996,8 @@ new_route_len(double cw, uint8_t purpose
       purpose != CIRCUIT_PURPOSE_S_ESTABLISH_INTRO)
     routelen++;
 #endif
-  log_debug(LD_CIRC,"Chosen route length %d (%d routers available).",routelen,
-            smartlist_len(routers));
+  log_debug(LD_CIRC,"Chosen route length %d (%d routers available).",
+            routelen, smartlist_len(routers));
 
   num_acceptable_routers = count_acceptable_routers(routers);
 

Index: dirserv.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/dirserv.c,v
retrieving revision 1.307
retrieving revision 1.308
diff -u -p -d -r1.307 -r1.308
--- dirserv.c	15 Mar 2006 05:06:56 -0000	1.307
+++ dirserv.c	18 Mar 2006 00:22:23 -0000	1.308
@@ -173,8 +173,13 @@ dirserv_parse_fingerprint_file(const cha
 
   cf = read_file_to_str(fname, 0);
   if (!cf) {
-    log_warn(LD_FS, "Cannot open fingerprint file %s", fname);
-    return -1;
+    if (get_options()->NamingAuthoritativeDir) {
+      log_warn(LD_FS, "Cannot open fingerprint file '%s'. Failing.", fname);
+      return -1;
+    } else {
+      log_info(LD_FS, "Cannot open fingerprint file '%s'. Returning.", fname);
+      return 0;
+    }
   }
   result = config_get_lines(cf, &front);
   tor_free(cf);

Index: routerlist.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/routerlist.c,v
retrieving revision 1.460
retrieving revision 1.461
diff -u -p -d -r1.460 -r1.461
--- routerlist.c	17 Mar 2006 22:08:59 -0000	1.460
+++ routerlist.c	18 Mar 2006 00:22:23 -0000	1.461
@@ -3245,7 +3245,7 @@ routers_update_status_from_networkstatus
       router->is_named = rs->status.is_named;
 
     if (!authdir) {
-      /* If we're an authdir, don't believe others. */
+      /* If we're not an authdir, believe others. */
       router->is_verified = rs->status.is_valid;
       router->is_running = rs->status.is_running;
       router->is_fast = rs->status.is_fast;



More information about the tor-commits mailing list