[tor-commits] [tor/release-0.2.4] Call ENETUNREACH a case of NOROUTE, not a case of INTERNAL.

arma at torproject.org arma at torproject.org
Tue Feb 25 20:08:22 UTC 2014


commit f5d32c08ba0b7307873324f8b24c4142523c1155
Author: Nick Mathewson <nickm at torproject.org>
Date:   Sun Feb 9 21:30:23 2014 -0500

    Call ENETUNREACH a case of NOROUTE, not a case of INTERNAL.
    
    Found by cypherpunks; fix for a part of bug 10777; bugfix on 0.1.0.1-rc.
---
 changes/10777_netunreach |    7 +++++++
 src/or/reasons.c         |    2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/changes/10777_netunreach b/changes/10777_netunreach
new file mode 100644
index 0000000..369774f
--- /dev/null
+++ b/changes/10777_netunreach
@@ -0,0 +1,7 @@
+  - Minor bugfixes:
+
+    - Treat ENETUNRECH at an exit node as a NOROUTE error, not an
+      INTERNAL error, since it can apparently happen when trying to
+      connect to the wrong sort of netblocks. Fixes a part of bug 10777;
+      bugfix on 0.1.0.1-rc.
+
diff --git a/src/or/reasons.c b/src/or/reasons.c
index 637f8cd..fc31a43 100644
--- a/src/or/reasons.c
+++ b/src/or/reasons.c
@@ -176,8 +176,8 @@ errno_to_stream_end_reason(int e)
     S_CASE(EAFNOSUPPORT):
     E_CASE(EACCES):
     S_CASE(ENOTCONN):
-    S_CASE(ENETUNREACH):
       return END_STREAM_REASON_INTERNAL;
+    S_CASE(ENETUNREACH):
     S_CASE(EHOSTUNREACH):
       return END_STREAM_REASON_NOROUTE;
     S_CASE(ECONNREFUSED):





More information about the tor-commits mailing list