]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Report EADDRNOTAVAIL and EADDRINUSE as RESOURCELIMIT
authorNick Mathewson <nickm@torproject.org>
Wed, 16 May 2012 16:31:45 +0000 (12:31 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 16 May 2012 16:46:24 +0000 (12:46 -0400)
These errors usually mean address exhaustion; reporting them as such
lets clients adjust their load to try other exits.

Fix for bug 4710; bugfix on 0.1.0.1-rc, which started using
END_STREAM_REASON_RESOURCELIMIT.

changes/bug4710 [new file with mode: 0644]
src/or/reasons.c

diff --git a/changes/bug4710 b/changes/bug4710
new file mode 100644 (file)
index 0000000..7f94b4d
--- /dev/null
@@ -0,0 +1,5 @@
+  o Minor bugfixes:
+    - Exit nodes now correcly report EADDRINUSE and EADDRNOTAVAIL as
+      resource exhaustion, so that clients can adjust their load to
+      try other exits. Fix for bug 4710; bugfix on 0.1.0.1-rc, which
+      started using END_STREAM_REASON_RESOURCELIMIT.
index 319e6c055ab608338d10f9280b886214ae115599..67abc350d1f51409a76e259a71a6ad3585500563 100644 (file)
@@ -184,6 +184,8 @@ errno_to_stream_end_reason(int e)
     S_CASE(ENOBUFS):
     case ENOMEM:
     case ENFILE:
+    S_CASE(EADDRINUSE):
+    S_CASE(EADDRNOTAVAIL):
     E_CASE(EMFILE):
       return END_STREAM_REASON_RESOURCELIMIT;
     default: