[or-cvs] add a new config option FetchUselessRouters, off by default...

arma at seul.org arma at seul.org
Sat Apr 8 21:35:19 UTC 2006


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

Modified Files:
	config.c or.h routerlist.c 
Log Message:
add a new config option FetchUselessRouters, off by default, for
when you plan to run "exitlist" on this client and you want to know
about even the non-running descriptors.


Index: config.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/config.c,v
retrieving revision 1.550
retrieving revision 1.551
diff -u -p -d -r1.550 -r1.551
--- config.c	8 Apr 2006 21:03:49 -0000	1.550
+++ config.c	8 Apr 2006 21:35:16 -0000	1.551
@@ -164,6 +164,7 @@ static config_var_t _option_vars[] = {
   VAR("FastFirstHopPK",      BOOL,     FastFirstHopPK,       "1"),
   VAR("FetchServerDescriptors",BOOL,   FetchServerDescriptors,"1"),
   VAR("FetchHidServDescriptors",BOOL,  FetchHidServDescriptors, "1"),
+  VAR("FetchUselessRouters", BOOL,     FetchUselessRouters,  "0"),
   VAR("Group",               STRING,   Group,                NULL),
   VAR("HardwareAccel",       BOOL,     HardwareAccel,        "0"),
   VAR("HashedControlPassword",STRING,  HashedControlPassword, NULL),

Index: or.h
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/or.h,v
retrieving revision 1.821
retrieving revision 1.822
diff -u -p -d -r1.821 -r1.822
--- or.h	8 Apr 2006 06:55:10 -0000	1.821
+++ or.h	8 Apr 2006 21:35:17 -0000	1.822
@@ -1286,6 +1286,7 @@ typedef struct {
   int PublishHidServDescriptors; /**< and our hidden service descriptors? */
   int FetchServerDescriptors; /**< Do we fetch server descriptors as normal? */
   int FetchHidServDescriptors; /** and hidden service descriptors? */
+  int FetchUselessRouters; /**< Do we fetch non-running descriptors too? */
   int AllDirActionsPrivate; /**< Should every directory action be sent
                              * through a Tor circuit? */
 

Index: routerlist.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/routerlist.c,v
retrieving revision 1.489
retrieving revision 1.490
diff -u -p -d -r1.489 -r1.490
--- routerlist.c	8 Apr 2006 21:19:40 -0000	1.489
+++ routerlist.c	8 Apr 2006 21:35:17 -0000	1.490
@@ -3251,8 +3251,9 @@ client_would_use_router(routerstatus_t *
     /* This one is too old to consider. */
     return 0;
   }
-  if (!rs->is_running) {
-    /* If we had this router descriptor, we wouldn't even bother using it. */
+  if (!rs->is_running && !get_options()->FetchUselessRouters) {
+    /* If we had this router descriptor, we wouldn't even bother using it.
+     * But, if we want to have a complete list, fetch it anyway. */
     return 0;
   }
   if (rs->published_on + ESTIMATED_PROPAGATION_TIME > now) {



More information about the tor-commits mailing list