aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-02-09 21:35:14 -0500
committerNick Mathewson <nickm@torproject.org>2014-02-09 21:35:14 -0500
commitb15f75b63266742aa6aa358c553799a31f0b350e (patch)
treeea2f6ab38badf9c226075d4f51636d81d80106c9 /src/or
parent9bb34aa897e4ecac27a6f8d50a659803f73c6cb9 (diff)
downloadtor-b15f75b63266742aa6aa358c553799a31f0b350e.tar
tor-b15f75b63266742aa6aa358c553799a31f0b350e.tar.gz
Don't treat END_STREAM_REASON_INTERNAL as total circuit failure
It can happen because we sent something that got an ENETUNREACH response. Bugfix on 0.2.4.8-alpha; fixes a part of bug 10777.
Diffstat (limited to 'src/or')
-rw-r--r--src/or/relay.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/relay.c b/src/or/relay.c
index 63119cbf0..57633f86a 100644
--- a/src/or/relay.c
+++ b/src/or/relay.c
@@ -731,13 +731,15 @@ connection_ap_process_end_not_open(
if (rh->length > 0) {
if (reason == END_STREAM_REASON_TORPROTOCOL ||
- reason == END_STREAM_REASON_INTERNAL ||
reason == END_STREAM_REASON_DESTROY) {
- /* All three of these reasons could mean a failed tag
+ /* Both of these reasons could mean a failed tag
* hit the exit and it complained. Do not probe.
* Fail the circuit. */
circ->path_state = PATH_STATE_USE_FAILED;
return -END_CIRC_REASON_TORPROTOCOL;
+ } else if (reason == END_STREAM_REASON_INTERNAL) {
+ /* We can't infer success or failure, since older Tors report
+ * ENETUNREACH as END_STREAM_REASON_INTERNAL. */
} else {
/* Path bias: If we get a valid reason code from the exit,
* it wasn't due to tagging.