diff options
author | Robert Hogan <robert@roberthogan.net> | 2010-10-17 12:27:57 +0100 |
---|---|---|
committer | Robert Hogan <robert@roberthogan.net> | 2010-10-17 12:27:57 +0100 |
commit | 0acd5e6208bfeec2fbbef3941bbe4cd694cd61f8 (patch) | |
tree | d486779674f08ccd6f581624aa1c7ce90a0e4fe8 /src | |
parent | 2d8f7a8391014a07fc7d45f169cf2f719d819d61 (diff) | |
download | tor-0acd5e6208bfeec2fbbef3941bbe4cd694cd61f8.tar.gz tor-0acd5e6208bfeec2fbbef3941bbe4cd694cd61f8.zip |
Issues with router_get_by_nickname()
https://trac.torproject.org/projects/tor/ticket/1859
Use router_get_by_digest() instead of router_get_by_hexdigest()
in circuit_discard_optional_exit_enclaves() and
rend_client_get_random_intro(), per Nick's comments.
Using router_get_by_digest() in rend_client_get_random_intro() will
break hidden services published by Tor versions pre 0.1.2.18 and
0.2.07-alpha as they only publish by nickname. This is acceptable
however as these versions only publish to authority tor26 and
don't work for versions in the 0.2.2.x series anyway.
Diffstat (limited to 'src')
-rw-r--r-- | src/or/connection_edge.c | 2 | ||||
-rw-r--r-- | src/or/rendclient.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 15b0610d53..ab2c9087ad 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -600,7 +600,7 @@ circuit_discard_optional_exit_enclaves(extend_info_t *info) !edge_conn->chosen_exit_retries) continue; r1 = router_get_by_nickname(edge_conn->chosen_exit_name, 0); - r2 = router_get_by_hexdigest(info->identity_digest); + r2 = router_get_by_digest(info->identity_digest); if (!r1 || !r2 || r1 != r2) continue; tor_assert(edge_conn->socks_request); diff --git a/src/or/rendclient.c b/src/or/rendclient.c index 6ff7f18966..cc1c2733a8 100644 --- a/src/or/rendclient.c +++ b/src/or/rendclient.c @@ -755,7 +755,7 @@ rend_client_get_random_intro(const rend_data_t *rend_query) intro = smartlist_get(entry->parsed->intro_nodes, i); /* Do we need to look up the router or is the extend info complete? */ if (!intro->extend_info->onion_key) { - router = router_get_by_hexdigest(intro->extend_info->identity_digest); + router = router_get_by_digest(intro->extend_info->identity_digest); if (!router) { log_info(LD_REND, "Unknown router with nickname '%s'; trying another.", intro->extend_info->nickname); |