diff options
author | Roger Dingledine <arma@torproject.org> | 2006-04-08 21:35:17 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2006-04-08 21:35:17 +0000 |
commit | 2a94c8b4934bbe5054c7b78bbb03223da4724205 (patch) | |
tree | 9f7cfe915672417450a74fa5c7570483fffc6c59 | |
parent | 3a5758e212f32f60f3a280213a0ebe356c4858ef (diff) | |
download | tor-2a94c8b4934bbe5054c7b78bbb03223da4724205.tar.gz tor-2a94c8b4934bbe5054c7b78bbb03223da4724205.zip |
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.
svn:r6326
-rw-r--r-- | src/or/config.c | 1 | ||||
-rw-r--r-- | src/or/or.h | 1 | ||||
-rw-r--r-- | src/or/routerlist.c | 5 |
3 files changed, 5 insertions, 2 deletions
diff --git a/src/or/config.c b/src/or/config.c index 7372eb9e9a..77f5a83f94 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -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), diff --git a/src/or/or.h b/src/or/or.h index 0e0e13ad59..43a8ebfb3b 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -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? */ diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 64f637853c..53bca88459 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -3251,8 +3251,9 @@ client_would_use_router(routerstatus_t *rs, time_t now) /* 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) { |