aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerlist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-07-11 10:02:24 -0400
committerNick Mathewson <nickm@torproject.org>2011-07-11 10:02:24 -0400
commit60832766ac19e8f027455d23254e376042c21ef2 (patch)
treed0ad897e5315d6689c1393dd4c06b5176734daaa /src/or/routerlist.c
parent3799ce7970a5d1fe21ce2921c763f06e4369cfee (diff)
downloadtor-60832766ac19e8f027455d23254e376042c21ef2.tar.gz
tor-60832766ac19e8f027455d23254e376042c21ef2.zip
Look at the right consensus in router_add_to_routerlist()
Just looking at the "latest" consensus could give us a microdesc consensus, if microdescs were enabled. That would make us decide that every routerdesc was unlisted in the latest consensus and drop them all: Ouch. Fixes bug 3113; bugfix on 0.2.3.1-alpha.
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r--src/or/routerlist.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 00557a26e9..5aaa4a9614 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -3273,7 +3273,8 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg,
int authdir = authdir_mode_handles_descs(options, router->purpose);
int authdir_believes_valid = 0;
routerinfo_t *old_router;
- networkstatus_t *consensus = networkstatus_get_latest_consensus();
+ networkstatus_t *consensus =
+ networkstatus_get_latest_consensus_by_flavor(FLAV_NS);
const smartlist_t *networkstatus_v2_list = networkstatus_get_v2_list();
int in_consensus = 0;