diff options
author | Roger Dingledine <arma@torproject.org> | 2008-02-21 09:00:54 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2008-02-21 09:00:54 +0000 |
commit | a60f7caa5490a38bd67d01ae65fb08c51250cd87 (patch) | |
tree | 2960a01b5d359b1a7ba823e3628d0cee536fdc09 /src/or/relay.c | |
parent | 18a209ffe6580115124ba08e125ff77c9478dcfb (diff) | |
download | tor-a60f7caa5490a38bd67d01ae65fb08c51250cd87.tar.gz tor-a60f7caa5490a38bd67d01ae65fb08c51250cd87.zip |
start allowing clients to give up on trackhostexits targets if
five circuit attempts fail for a given stream. part of the fix
for bug 437. still an XXX020rc remaining.
svn:r13648
Diffstat (limited to 'src/or/relay.c')
-rw-r--r-- | src/or/relay.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/or/relay.c b/src/or/relay.c index 0dc79e4488..9b3052b392 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -771,9 +771,18 @@ connection_edge_process_end_not_open( NULL)) { control_event_stream_status(conn, STREAM_EVENT_REMAP, 0); } - if (conn->_base.chosen_exit_optional) { + if (conn->_base.chosen_exit_optional || + conn->_base.chosen_exit_retries) { /* stop wanting a specific exit */ conn->_base.chosen_exit_optional = 0; + /* A non-zero chosen_exit_retries can happen if we set a + * TrackHostExits for this address under a port that the exit + * relay allows, but then try the same address with a different + * port that it doesn't allow to exit. We shouldn't unregister + * the mapping, since it is probably still wanted on the + * original port. But now we give away to the exit relay that + * we probably have a TrackHostExits on it. So be it. */ + conn->_base.chosen_exit_retries = 0; tor_free(conn->chosen_exit_name); /* clears it */ } if (connection_ap_detach_retriable(conn, circ, control_reason) >= 0) |