aboutsummaryrefslogtreecommitdiff
path: root/src/or/relay.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-01-16 12:52:15 -0500
committerNick Mathewson <nickm@torproject.org>2013-01-16 12:52:19 -0500
commite53e6caac533006245c28657f44e5c929e753336 (patch)
treec47d3dc24f8fb91b2ee8f160d81497e2fe3591b2 /src/or/relay.c
parentd1b5ae903f330c03c32baa60fcc6679d148ad8ac (diff)
downloadtor-e53e6caac533006245c28657f44e5c929e753336.tar
tor-e53e6caac533006245c28657f44e5c929e753336.tar.gz
Adjust control_reason when adjusting reason (related to 7902)
Diffstat (limited to 'src/or/relay.c')
-rw-r--r--src/or/relay.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/relay.c b/src/or/relay.c
index 2701263e5..5ac4fbfeb 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 */
@@ -738,6 +738,8 @@ connection_ap_process_end_not_open(
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)) {