diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-02-07 15:04:11 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-02-07 15:04:11 -0500 |
commit | ad28397bbf1744993538fa96675a55bba59f2b57 (patch) | |
tree | 0187431b96905bccb733a6a8ba9a19d1bb7b38d0 /src/or/relay.c | |
parent | 522b312a5155510fb539c9a85994ead13d2b19ce (diff) | |
parent | e53e6caac533006245c28657f44e5c929e753336 (diff) | |
download | tor-ad28397bbf1744993538fa96675a55bba59f2b57.tar.gz tor-ad28397bbf1744993538fa96675a55bba59f2b57.zip |
Merge branch 'bug7902'
Diffstat (limited to 'src/or/relay.c')
-rw-r--r-- | src/or/relay.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/or/relay.c b/src/or/relay.c index 3ae5b47ba5..5d06fd93fd 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -710,7 +710,7 @@ connection_ap_process_end_not_open( struct in_addr in; node_t *exitrouter; int reason = *(cell->payload+RELAY_HEADER_SIZE); - int control_reason = reason | END_STREAM_REASON_FLAG_REMOTE; + int control_reason; edge_connection_t *edge_conn = ENTRY_TO_EDGE_CONN(conn); (void) layer_hint; /* unused */ @@ -734,7 +734,13 @@ connection_ap_process_end_not_open( } } - if (rh->length > 0 && edge_reason_is_retriable(reason) && + if (rh->length == 0) { + reason = END_STREAM_REASON_MISC; + } + + control_reason = reason | END_STREAM_REASON_FLAG_REMOTE; + + if (edge_reason_is_retriable(reason) && /* avoid retry if rend */ !connection_edge_is_rendezvous_stream(edge_conn)) { const char *chosen_exit_digest = |