aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/or/connection_edge.c2
-rw-r--r--src/or/rendclient.c6
-rw-r--r--src/or/routerlist.c3
3 files changed, 6 insertions, 5 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index d595e6b72..22711d6ae 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 = node_get_by_nickname(edge_conn->chosen_exit_name, 0);
- r2 = node_get_by_nickname(info->nickname, 0);
+ r2 = node_get_by_id(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 848b02d3a..5c5c48afb 100644
--- a/src/or/rendclient.c
+++ b/src/or/rendclient.c
@@ -755,7 +755,11 @@ 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) {
- const node_t *node = node_get_by_nickname(intro->extend_info->nickname, 0);
+ const node_t *node;
+ if (tor_digest_is_zero(intro->extend_info->identity_digest))
+ node = node_get_by_hex_id(intro->extend_info->nickname);
+ else
+ node = node_get_by_id(intro->extend_info->identity_digest);
if (!node) {
log_info(LD_REND, "Unknown router with nickname '%s'; trying another.",
intro->extend_info->nickname);
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index ab647539f..143591199 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -2316,9 +2316,6 @@ router_get_by_nickname(const char *nickname, int warn_if_unnamed)
return router_get_by_hexdigest(nickname);
if (!strcasecmp(nickname, UNNAMED_ROUTER_NICKNAME))
return NULL;
- if (server_mode(get_options()) &&
- !strcasecmp(nickname, get_options()->Nickname))
- return router_get_my_routerinfo();
maybedigest = (strlen(nickname) >= HEX_DIGEST_LEN) &&
(base16_decode(digest,DIGEST_LEN,nickname,HEX_DIGEST_LEN) == 0);