]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
a potential fix for bug 641.
authorRoger Dingledine <arma@torproject.org>
Wed, 2 Apr 2008 20:48:36 +0000 (20:48 +0000)
committerRoger Dingledine <arma@torproject.org>
Wed, 2 Apr 2008 20:48:36 +0000 (20:48 +0000)
svn:r14281

src/or/connection_edge.c

index 7d5c4ffb7e0d8d3dffbd009b9712a94d70984eb8..ae24d5fc1937934fe01352f4c9637d197ee7ffd9 100644 (file)
@@ -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);