[or-cvs] r14281: a potential fix for bug 641. (tor/trunk/src/or)

arma at seul.org arma at seul.org
Wed Apr 2 20:48:37 UTC 2008


Author: arma
Date: 2008-04-02 16:48:36 -0400 (Wed, 02 Apr 2008)
New Revision: 14281

Modified:
   tor/trunk/src/or/connection_edge.c
Log:
a potential fix for bug 641.


Modified: tor/trunk/src/or/connection_edge.c
===================================================================
--- tor/trunk/src/or/connection_edge.c	2008-04-02 19:08:19 UTC (rev 14280)
+++ tor/trunk/src/or/connection_edge.c	2008-04-02 20:48:36 UTC (rev 14281)
@@ -2770,7 +2770,10 @@
    * 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);



More information about the tor-commits mailing list