]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Retry circuits if the exit node is optional and nonexistant.
authorNick Mathewson <nickm@torproject.org>
Mon, 9 Feb 2009 16:55:48 +0000 (16:55 +0000)
committerNick Mathewson <nickm@torproject.org>
Mon, 9 Feb 2009 16:55:48 +0000 (16:55 +0000)
Previously, when we had the chosen_exit set but marked optional, and
we failed because we couldn't find an onion key for it, we'd just give
up on the circuit.  But what we really want to do is try again, without
the forced exit node.

Spotted by rovv.  Another case of bug 752.  I think this might be
unreachable in our current code, but proposal 158 could change that.

svn:r18451

ChangeLog
src/or/circuituse.c

index ab192a01aaf89f03dda2e876df11351b764eb193..1c0b8ee52d4f528a6907ea13bcfe9416ba01da32 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,11 @@ Changes in version 0.2.1.13-????? - 2009-0?-??
       We previously did this from the startup script, but that was no
       help to people who didn't use the startup script.  Resolves
       bug 863.
+    - When we had picked an exit node for a connection, but marked it as
+      "optional", and it turned out we had no onion key for the exit,
+      stop preferring the exit and try again.  This situation may not be
+      possible now, but will probably become feasible with proposal 158.
+      Spotted by rovv.  Fixes another case of bug 752.
 
   o Minor features:
     - On Linux, use the prctl call to re-enable core dumps when the user
index 4bc6fcbe8faac9329b8d2314d77cf76532e9c530..a1c8d1c148d1df4198c0f61a8526ca05ee904711 100644 (file)
@@ -1165,7 +1165,10 @@ circuit_get_open_circ_or_launch(edge_connection_t *conn,
             if (opt) {
               conn->chosen_exit_optional = 0;
               tor_free(conn->chosen_exit_name);
-              return 0;
+              /* Try again with no requested exit */
+              return circuit_get_open_circ_or_launch(conn,
+                                                     desired_circuit_purpose,
+                                                     circp);
             }
             return -1;
           }