aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuitbuild.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-07-21 09:35:24 +0000
committerRoger Dingledine <arma@torproject.org>2004-07-21 09:35:24 +0000
commitfd0fcc89e98068643599fb79b299e62a9b07f924 (patch)
tree07bf4026cc777d6c282acd37cc0ee5e95cae9e41 /src/or/circuitbuild.c
parentecc900925606c5e7b5ad538d38a789f5d2add0d2 (diff)
downloadtor-fd0fcc89e98068643599fb79b299e62a9b07f924.tar.gz
tor-fd0fcc89e98068643599fb79b299e62a9b07f924.zip
disallow picking unverified routers in circuits
(for now) svn:r2082
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r--src/or/circuitbuild.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index b1240645c2..5887437931 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -842,6 +842,13 @@ static routerinfo_t *choose_good_exit_server_general(routerlist_t *dir)
router->nickname, i);
continue; /* skip routers that are known to be down */
}
+ if(!router->is_verified) {
+ n_supported[i] = -1;
+ log_fn(LOG_DEBUG,"Skipping node %s (index %d) -- unverified router.",
+ router->nickname, i);
+ /* XXX008 maybe one day allow unverified routers as exits */
+ continue; /* skip unverified routers */
+ }
if(router_exit_policy_rejects_all(router)) {
n_supported[i] = -1;
log_fn(LOG_DEBUG,"Skipping node %s (index %d) -- it rejects all.",
@@ -1012,6 +1019,10 @@ static int count_acceptable_routers(smartlist_t *routers) {
log_fn(LOG_DEBUG,"Nope, the directory says %d is not running.",i);
goto next_i_loop;
}
+ if(r->is_verified == 0) {
+ log_fn(LOG_DEBUG,"Nope, the directory says %d is not verified.",i);
+ goto next_i_loop; /* XXX008 */
+ }
if(clique_mode()) {
conn = connection_get_by_identity_digest(r->identity_digest,
CONN_TYPE_OR);