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

[or-cvs] r12770: Backport r12766: Patch from mwenge: fix consensus status loo (in tor/branches/tor-0_1_2-patches: . src/or)



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

Modified:
   tor/branches/tor-0_1_2-patches/
   tor/branches/tor-0_1_2-patches/ChangeLog
   tor/branches/tor-0_1_2-patches/src/or/routerlist.c
Log:
 r17095@catbus:  nickm | 2007-12-11 18:11:13 -0500
 Backport r12766: Patch from mwenge: fix consensus status lookup by nickname when nickname is a hexdigest.



Property changes on: tor/branches/tor-0_1_2-patches
___________________________________________________________________
 svk:merge ticket from /tor/012 [r17095] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/branches/tor-0_1_2-patches/ChangeLog
===================================================================
--- tor/branches/tor-0_1_2-patches/ChangeLog	2007-12-11 23:16:25 UTC (rev 12769)
+++ tor/branches/tor-0_1_2-patches/ChangeLog	2007-12-11 23:17:06 UTC (rev 12770)
@@ -88,6 +88,9 @@
       is fishy. Resolves bug 463.
     - Don't reset trusted dir server list when we set a configuration
       option. Patch from Robert Hogan.
+    - 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. (Patch from mwenge.)
 
 
 Changes in version 0.1.2.17 - 2007-08-30

Modified: tor/branches/tor-0_1_2-patches/src/or/routerlist.c
===================================================================
--- tor/branches/tor-0_1_2-patches/src/or/routerlist.c	2007-12-11 23:16:25 UTC (rev 12769)
+++ tor/branches/tor-0_1_2-patches/src/or/routerlist.c	2007-12-11 23:17:06 UTC (rev 12770)
@@ -2845,11 +2845,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 router_get_combined_status_by_digest(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 router_get_combined_status_by_digest(digest);
   }