[tor-commits] [tor/maint-0.2.3] Refuse extra create cells with reason "resource limit"

nickm at torproject.org nickm at torproject.org
Thu Oct 4 16:49:08 UTC 2012


commit e50fa0d6cb467e8f6d41995eb6d03d74e9f64e04
Author: Roger Dingledine <arma at torproject.org>
Date:   Wed Oct 3 20:17:37 2012 -0400

    Refuse extra create cells with reason "resource limit"
    
    In the past we had used reason "internal", which is more vague than
    it needs to be. Resolves bug 7037.
---
 changes/bug7037  |    6 ++++++
 src/or/command.c |    2 +-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/changes/bug7037 b/changes/bug7037
new file mode 100644
index 0000000..fc3a1ad
--- /dev/null
+++ b/changes/bug7037
@@ -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.
diff --git a/src/or/command.c b/src/or/command.c
index abf664c..d8a409b 100644
--- a/src/or/command.c
+++ b/src/or/command.c
@@ -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.");





More information about the tor-commits mailing list