[tor-commits] [tor/master] Look at the right consensus in router_add_to_routerlist()

nickm at torproject.org nickm at torproject.org
Mon Jul 11 14:03:32 UTC 2011


commit 60832766ac19e8f027455d23254e376042c21ef2
Author: Nick Mathewson <nickm at torproject.org>
Date:   Mon Jul 11 10:02:24 2011 -0400

    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.
---
 changes/bug3113     |    4 ++++
 src/or/routerlist.c |    3 ++-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/changes/bug3113 b/changes/bug3113
new file mode 100644
index 0000000..7c3b5ce
--- /dev/null
+++ b/changes/bug3113
@@ -0,0 +1,4 @@
+  o Minor bugfixes:
+    - Do not free all general-purposes regular descriptors just
+      because microdescriptor use is enabled. Fixes bug 3113;
+      bugfix on 0.2.3.1-alpha.
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 00557a2..5aaa4a9 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;
 



More information about the tor-commits mailing list