]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Refuse extra create cells with reason "resource limit"
authorRoger Dingledine <arma@torproject.org>
Thu, 4 Oct 2012 00:17:37 +0000 (20:17 -0400)
committerRoger Dingledine <arma@torproject.org>
Thu, 4 Oct 2012 00:17:37 +0000 (20:17 -0400)
In the past we had used reason "internal", which is more vague than
it needs to be. Resolves bug 7037.

changes/bug7037 [new file with mode: 0644]
src/or/command.c

diff --git a/changes/bug7037 b/changes/bug7037
new file mode 100644 (file)
index 0000000..fc3a1ad
--- /dev/null
@@ -0,0 +1,6 @@
+  o Minor bugfixes:
+    - When relays refuse a "create" cell because their queue of pending
+      create cells is too big (typically because their cpu can't keep up
+      with the arrival rate), send back reason "resource limit" rather
+      than reason "internal", so network measurement scripts can get a
+      more accurate picture. Bugfix on 0.1.1.11-alpha; fixes bug 7037.
index abf664c1e2a5f733fac2228aa8f5fc287746cf74..d8a409bc275dadb163e7e06db21f164ae585c66e 100644 (file)
@@ -428,7 +428,7 @@ command_process_create_cell(cell_t *cell, or_connection_t *conn)
         log_warn(LD_GENERAL,"Failed to hand off onionskin. Closing.%s",m);
         tor_free(m);
       }
-      circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_INTERNAL);
+      circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_RESOURCELIMIT);
       return;
     }
     log_debug(LD_OR,"success: handed off onionskin.");