aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-02-11 18:58:58 -0500
committerNick Mathewson <nickm@torproject.org>2014-02-11 18:58:58 -0500
commit0ee449ca92dc7f25517a63b63f4d521fdd48410b (patch)
tree620c7c78bfaefec8dd3fb411cd4881bfa66895ae /src
parentc3720c05fa44b3790ab0dc37e2506ee482796e21 (diff)
parent91d4bb0b000e1bdaf8569339a9b843c50e13e47e (diff)
downloadtor-0ee449ca92dc7f25517a63b63f4d521fdd48410b.tar
tor-0ee449ca92dc7f25517a63b63f4d521fdd48410b.tar.gz
Merge remote-tracking branch 'origin/maint-0.2.4'
Diffstat (limited to 'src')
-rw-r--r--src/or/reasons.c5
-rw-r--r--src/or/relay.c6
2 files changed, 7 insertions, 4 deletions
diff --git a/src/or/reasons.c b/src/or/reasons.c
index 637f8cdc7..6eb2643a8 100644
--- a/src/or/reasons.c
+++ b/src/or/reasons.c
@@ -174,11 +174,12 @@ errno_to_stream_end_reason(int e)
S_CASE(ENOTSOCK):
S_CASE(EPROTONOSUPPORT):
S_CASE(EAFNOSUPPORT):
- E_CASE(EACCES):
S_CASE(ENOTCONN):
- S_CASE(ENETUNREACH):
return END_STREAM_REASON_INTERNAL;
+ S_CASE(ENETUNREACH):
S_CASE(EHOSTUNREACH):
+ E_CASE(EACCES):
+ E_CASE(EPERM):
return END_STREAM_REASON_NOROUTE;
S_CASE(ECONNREFUSED):
return END_STREAM_REASON_CONNECTREFUSED;
diff --git a/src/or/relay.c b/src/or/relay.c
index 94016b49f..dc234c1f2 100644
--- a/src/or/relay.c
+++ b/src/or/relay.c
@@ -735,13 +735,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.