]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Don't treat END_STREAM_REASON_INTERNAL as total circuit failure
authorNick Mathewson <nickm@torproject.org>
Mon, 10 Feb 2014 02:35:14 +0000 (21:35 -0500)
committerNick Mathewson <nickm@torproject.org>
Mon, 10 Feb 2014 02:35:14 +0000 (21:35 -0500)
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.

changes/bug10777_internal_024 [new file with mode: 0644]
src/or/relay.c

diff --git a/changes/bug10777_internal_024 b/changes/bug10777_internal_024
new file mode 100644 (file)
index 0000000..4544147
--- /dev/null
@@ -0,0 +1,4 @@
+  o Major bugfixes:
+    - Do not treat END_STREAM_REASON_INTERNAL as indicating a definite
+      circuit failure, since it could also indicate an ENETUNREACH
+      error. Fixes part of bug 10777; bugfix on 0.2.4.8-alpha.
index 63119cbf07d1ebffd9af5dc2715d6e7ce2a2d5c1..57633f86ab692522be621be693ccf877e7d8e3df 100644 (file)
@@ -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.