[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r15227: Asking for a conditional consensus at .../consensus/<fingerp (in tor/trunk: . src/or)



Author: weasel
Date: 2008-06-13 14:58:58 -0400 (Fri, 13 Jun 2008)
New Revision: 15227

Modified:
   tor/trunk/ChangeLog
   tor/trunk/src/or/directory.c
Log:
Asking for a conditional consensus at .../consensus/<fingerprints> would crash
a dirserver if it did not already have a consensus.


Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2008-06-13 18:46:44 UTC (rev 15226)
+++ tor/trunk/ChangeLog	2008-06-13 18:58:58 UTC (rev 15227)
@@ -1,6 +1,9 @@
 Changes in version 0.2.1.2-alpha - 2008-??-??
   o Minor features:
     - Allow OpenSSL to use dynamic locks if it wants.
+  o Bugfixes:
+    - Asking for a conditional consensus at .../consensus/<fingerprints>
+      would crash a dirserver if it did not already have a consensus.
 
 Changes in version 0.2.1.1-alpha - 2008-06-13
   o Major features:

Modified: tor/trunk/src/or/directory.c
===================================================================
--- tor/trunk/src/or/directory.c	2008-06-13 18:46:44 UTC (rev 15226)
+++ tor/trunk/src/or/directory.c	2008-06-13 18:58:58 UTC (rev 15227)
@@ -2493,7 +2493,8 @@
       networkstatus_t *v = networkstatus_get_latest_consensus();
       time_t now = time(NULL);
       #define CONSENSUS_URL_PREFIX "/tor/status-vote/current/consensus/"
-      if (!strcmpstart(url, CONSENSUS_URL_PREFIX) &&
+      if (v &&
+          !strcmpstart(url, CONSENSUS_URL_PREFIX) &&
           !client_likes_consensus(v, url + strlen(CONSENSUS_URL_PREFIX))) {
         write_http_status_line(conn, 404, "Consensus not signed by sufficient "
                                           "number of requested authorities");
@@ -3430,3 +3431,4 @@
   return 0;
 }
 
+/* vim:set et ts=2: */