summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2008-04-02 20:48:36 +0000
committerRoger Dingledine <arma@torproject.org>2008-04-02 20:48:36 +0000
commit1ac11591d2298fdb92a468d8337bd341fd12ee3f (patch)
treee244b7dbb59e27ab2e6a11a3ed964f065ee67d5e
parent5174e388a667870287983f6b405111fa37e79ea6 (diff)
downloadtor-1ac11591d2298fdb92a468d8337bd341fd12ee3f.tar.gz
tor-1ac11591d2298fdb92a468d8337bd341fd12ee3f.zip
a potential fix for bug 641.
svn:r14281
-rw-r--r--src/or/connection_edge.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 7d5c4ffb7e..ae24d5fc19 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -2770,7 +2770,10 @@ connection_ap_can_use_exit(edge_connection_t *conn, routerinfo_t *exit)
* make sure the exit node of the existing circuit matches exactly.
*/
if (conn->chosen_exit_name) {
- if (router_get_by_nickname(conn->chosen_exit_name, 1) != exit) {
+ routerinfo_t *chosen_exit =
+ router_get_by_nickname(conn->chosen_exit_name, 1);
+ if (!chosen_exit || memcpy(chosen_exit->cache_info.identity_digest,
+ exit->cache_info.identity_digest, DIGEST_LEN)) {
/* doesn't match */
// log_debug(LD_APP,"Requested node '%s', considering node '%s'. No.",
// conn->chosen_exit_name, exit->nickname);