aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-12-11 23:06:45 +0000
committerNick Mathewson <nickm@torproject.org>2007-12-11 23:06:45 +0000
commit3208b102d63d40cdff50dc063ae5e84da44cba50 (patch)
tree4c10ed9f74eb43dc621482e594c55c6d68a53bb4
parent78f532678c9cef1ed0fdede6cf97ada3fc2bdfb8 (diff)
downloadtor-3208b102d63d40cdff50dc063ae5e84da44cba50.tar.gz
tor-3208b102d63d40cdff50dc063ae5e84da44cba50.zip
r17089@catbus: nickm | 2007-12-11 17:33:34 -0500
Patch from mwenge: fix consensus status lookup by nickname when nickname is a hexdigest. svn:r12766
-rw-r--r--ChangeLog3
-rw-r--r--src/or/networkstatus.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 8d1b4ee733..4cd8694f0e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -58,6 +58,9 @@ Changes in version 0.2.0.13-alpha - 2007-12-??
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
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c
index 6a72340bab..dadfbc54d4 100644
--- a/src/or/networkstatus.c
+++ b/src/or/networkstatus.c
@@ -830,11 +830,11 @@ router_get_consensus_status_by_nickname(const char *nickname,
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);
}