[or-cvs] [tor/master 1/4] Handle EHOSTUNREACH in errno_to_stream_end_reason()

nickm at torproject.org nickm at torproject.org
Mon Aug 16 01:28:47 UTC 2010


Author: Sebastian Hahn <sebastian at torproject.org>
Date: Tue, 3 Aug 2010 13:57:13 +0200
Subject: Handle EHOSTUNREACH in errno_to_stream_end_reason()
Commit: b8aa14a39b2f96edad8ca0b5a9ea5be218837ce0

We used to not recognize it and returned END_STREAM_REASON_MISC.
Instead, return END_STREAM_REASON_INTERNAL.
---
 changes/misc-reason |    3 +++
 src/or/reasons.c    |    1 +
 2 files changed, 4 insertions(+), 0 deletions(-)
 create mode 100644 changes/misc-reason

diff --git a/changes/misc-reason b/changes/misc-reason
new file mode 100644
index 0000000..2559fe6
--- /dev/null
+++ b/changes/misc-reason
@@ -0,0 +1,3 @@
+  o Minor bugfixes:
+    - Exit nodes didn't recognize EHOSTUNREACH as a stream ending reason
+      and sent back misc. Bugfix on 0.1.0.1-rc; fixes bug 1793.
diff --git a/src/or/reasons.c b/src/or/reasons.c
index 45b5923..27abb79 100644
--- a/src/or/reasons.c
+++ b/src/or/reasons.c
@@ -161,6 +161,7 @@ errno_to_stream_end_reason(int e)
     E_CASE(EACCES):
     S_CASE(ENOTCONN):
     S_CASE(ENETUNREACH):
+    E_CASE(EHOSTUNREACH):
       return END_STREAM_REASON_INTERNAL;
     S_CASE(ECONNREFUSED):
       return END_STREAM_REASON_CONNECTREFUSED;
-- 
1.7.1




More information about the tor-commits mailing list