aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuituse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-02-09 16:55:48 +0000
committerNick Mathewson <nickm@torproject.org>2009-02-09 16:55:48 +0000
commit6f90f6f2a22d118d8aa7a8aad7770e690c4b7138 (patch)
tree366899106dc41c79c2658a23042fc24215c8fc88 /src/or/circuituse.c
parentc7315e65ae2940ac514fbd0e0a8e94e13db19cba (diff)
downloadtor-6f90f6f2a22d118d8aa7a8aad7770e690c4b7138.tar
tor-6f90f6f2a22d118d8aa7a8aad7770e690c4b7138.tar.gz
Retry circuits if the exit node is optional and nonexistant.
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
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r--src/or/circuituse.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index 4bc6fcbe8..a1c8d1c14 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -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;
}