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

[or-cvs] r12766: Patch from mwenge: fix consensus status lookup by nickname w (in tor/trunk: . src/or)



Author: nickm
Date: 2007-12-11 18:06:45 -0500 (Tue, 11 Dec 2007)
New Revision: 12766

Modified:
   tor/trunk/
   tor/trunk/ChangeLog
   tor/trunk/src/or/networkstatus.c
Log:
 r17089@catbus:  nickm | 2007-12-11 17:33:34 -0500
 Patch from mwenge: fix consensus status lookup by nickname when nickname is a hexdigest.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r17089] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2007-12-11 22:13:46 UTC (rev 12765)
+++ tor/trunk/ChangeLog	2007-12-11 23:06:45 UTC (rev 12766)
@@ -58,6 +58,9 @@
       using bridges or we have StrictEntryNodes set), don't mark relays
       down when they fail a directory request. Otherwise we're too quick
       to mark all our entry points down.
+    - Fix handling of hex nicknames when answering controller requests for
+      networkstatus by name, or when deciding whether to warn about unknown
+      routers in a config option. Bugfix on 0.2.0.x. (Patch from mwenge.)
 
   o Minor features:
     - On USR1, when dmalloc is in use, log the top 10 memory

Modified: tor/trunk/src/or/networkstatus.c
===================================================================
--- tor/trunk/src/or/networkstatus.c	2007-12-11 22:13:46 UTC (rev 12765)
+++ tor/trunk/src/or/networkstatus.c	2007-12-11 23:06:45 UTC (rev 12766)
@@ -830,11 +830,11 @@
     return NULL;
 
   if (nickname[0] == '$') {
-    if (base16_decode(digest, DIGEST_LEN, nickname+1, strlen(nickname))<0)
+    if (base16_decode(digest, DIGEST_LEN, nickname+1, strlen(nickname+1))<0)
       return NULL;
     return networkstatus_vote_find_entry(current_consensus, digest);
   } else if (strlen(nickname) == HEX_DIGEST_LEN &&
-       (base16_decode(digest, DIGEST_LEN, nickname+1, strlen(nickname))==0)) {
+       (base16_decode(digest, DIGEST_LEN, nickname, strlen(nickname))==0)) {
     return networkstatus_vote_find_entry(current_consensus, digest);
   }