diff options
author | Sebastian Hahn <sebastian@torproject.org> | 2014-09-05 01:49:47 +0200 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-09-09 11:54:20 -0400 |
commit | 409a56281eda6e0f39ecb1a2737eb4ab39b0229b (patch) | |
tree | a6e0c58a7c850fc44086cff029b9325859cd4cc6 | |
parent | 8099dee99234519a76580bb9ae479a878b7a45e0 (diff) | |
download | tor-409a56281eda6e0f39ecb1a2737eb4ab39b0229b.tar.gz tor-409a56281eda6e0f39ecb1a2737eb4ab39b0229b.zip |
Remove client-side bad directory logic
Implements the second half of #13060.
-rw-r--r-- | changes/bug13060 | 2 | ||||
-rw-r--r-- | src/or/dirserv.c | 3 | ||||
-rw-r--r-- | src/or/networkstatus.c | 1 | ||||
-rw-r--r-- | src/or/nodelist.c | 4 | ||||
-rw-r--r-- | src/or/or.h | 4 | ||||
-rw-r--r-- | src/or/routerlist.c | 2 | ||||
-rw-r--r-- | src/or/routerparse.c | 2 |
7 files changed, 4 insertions, 14 deletions
diff --git a/changes/bug13060 b/changes/bug13060 index 7abc1968f8..58bd2b230b 100644 --- a/changes/bug13060 +++ b/changes/bug13060 @@ -1,4 +1,6 @@ o Removed features: - Directory authorities do not support giving out the BadDirectory flag anymore. + - Clients don't understand the BadDirectory flag in the consensus + anymore, and ignore it. diff --git a/src/or/dirserv.c b/src/or/dirserv.c index d96867b2c2..92d34e2df7 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -2181,8 +2181,7 @@ clear_status_flags_on_sybil(routerstatus_t *rs) { rs->is_authority = rs->is_exit = rs->is_stable = rs->is_fast = rs->is_flagged_running = rs->is_named = rs->is_valid = - rs->is_hs_dir = rs->is_possible_guard = rs->is_bad_exit = - rs->is_bad_directory = 0; + rs->is_hs_dir = rs->is_possible_guard = rs->is_bad_exit = 0; /* FFFF we might want some mechanism to check later on if we * missed zeroing any flags: it's easy to add a new flag but * forget to add it to this clause. */ diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c index 220faf0202..95eb32035b 100644 --- a/src/or/networkstatus.c +++ b/src/or/networkstatus.c @@ -1055,7 +1055,6 @@ routerstatus_has_changed(const routerstatus_t *a, const routerstatus_t *b) a->is_valid != b->is_valid || a->is_possible_guard != b->is_possible_guard || a->is_bad_exit != b->is_bad_exit || - a->is_bad_directory != b->is_bad_directory || a->is_hs_dir != b->is_hs_dir || a->version_known != b->version_known; } diff --git a/src/or/nodelist.c b/src/or/nodelist.c index d7deac1214..f37fb49927 100644 --- a/src/or/nodelist.c +++ b/src/or/nodelist.c @@ -241,7 +241,6 @@ nodelist_set_consensus(networkstatus_t *ns) node->is_stable = rs->is_stable; node->is_possible_guard = rs->is_possible_guard; node->is_exit = rs->is_exit; - node->is_bad_directory = rs->is_bad_directory; node->is_bad_exit = rs->is_bad_exit; node->is_hs_dir = rs->is_hs_dir; node->ipv6_preferred = 0; @@ -267,8 +266,7 @@ nodelist_set_consensus(networkstatus_t *ns) node->is_valid = node->is_running = node->is_hs_dir = node->is_fast = node->is_stable = node->is_possible_guard = node->is_exit = - node->is_bad_exit = node->is_bad_directory = - node->ipv6_preferred = 0; + node->is_bad_exit = node->ipv6_preferred = 0; } } } SMARTLIST_FOREACH_END(node); diff --git a/src/or/or.h b/src/or/or.h index 6ef71e9c57..06d4e3c926 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -2139,8 +2139,6 @@ typedef struct routerstatus_t { * choice as an entry guard. */ unsigned int is_bad_exit:1; /**< True iff this node is a bad choice for * an exit node. */ - unsigned int is_bad_directory:1; /**< Do we think this directory is junky, - * underpowered, or otherwise useless? */ unsigned int is_hs_dir:1; /**< True iff this router is a v2-or-later hidden * service directory. */ /** True iff we know version info for this router. (i.e., a "v" entry was @@ -2300,8 +2298,6 @@ typedef struct node_t { unsigned int is_exit:1; /**< Do we think this is an OK exit? */ unsigned int is_bad_exit:1; /**< Do we think this exit is censored, borked, * or otherwise nasty? */ - unsigned int is_bad_directory:1; /**< Do we think this directory is junky, - * underpowered, or otherwise useless? */ unsigned int is_hs_dir:1; /**< True iff this router is a hidden service * directory according to the authorities. */ diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 14451c0cd8..697837e509 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -1450,8 +1450,6 @@ router_pick_directory_server_impl(dirinfo_type_t type, int flags) if (!node->is_running || !status->dir_port || !node->is_valid) continue; - if (node->is_bad_directory) - continue; if (requireother && router_digest_is_me(node->identity)) continue; is_trusted = router_digest_is_trusted_dir(node->identity); diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 337ba57a5a..281341d134 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -1900,8 +1900,6 @@ routerstatus_parse_entry_from_string(memarea_t *area, rs->is_possible_guard = 1; else if (!strcmp(tok->args[i], "BadExit")) rs->is_bad_exit = 1; - else if (!strcmp(tok->args[i], "BadDirectory")) - rs->is_bad_directory = 1; else if (!strcmp(tok->args[i], "Authority")) rs->is_authority = 1; else if (!strcmp(tok->args[i], "Unnamed") && |