[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r12638: We were ignoring our RelayBandwidthRate for the first 30 sec (in tor/trunk: . doc src/or)



Author: arma
Date: 2007-12-02 06:24:06 -0500 (Sun, 02 Dec 2007)
New Revision: 12638

Modified:
   tor/trunk/ChangeLog
   tor/trunk/doc/TODO
   tor/trunk/src/or/circuitbuild.c
Log:
We were ignoring our RelayBandwidthRate for the first 30 seconds
after opening a circuit -- even relayed circuits. Bugfix on
0.2.0.3-alpha.


Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2007-12-02 11:22:42 UTC (rev 12637)
+++ tor/trunk/ChangeLog	2007-12-02 11:24:06 UTC (rev 12638)
@@ -5,8 +5,12 @@
       two new guards on startup (bugfix on 0.2.0.9-alpha), and it was
       causing us to discard all our guards on startup if we hadn't been
       running for a few weeks (bugfix on 0.1.2.x). Fixes bug 448.
-    - Start purging old entries from the "rephist" database, and the
-      hidden service descriptor databases, even when DirPort is zero.
+    - Purge old entries from the "rephist" database and the hidden
+      service descriptor databases even when DirPort is zero. Bugfix
+      on 0.1.2.x.
+    - We were ignoring our RelayBandwidthRate for the first 30 seconds
+      after opening a circuit -- even relayed circuits. Bugfix on
+      0.2.0.3-alpha.
 
   o Minor bugfixes:
     - The fix in 0.2.0.12-alpha cleared the "hsdir" flag in v3 network

Modified: tor/trunk/doc/TODO
===================================================================
--- tor/trunk/doc/TODO	2007-12-02 11:22:42 UTC (rev 12637)
+++ tor/trunk/doc/TODO	2007-12-02 11:24:06 UTC (rev 12638)
@@ -107,7 +107,7 @@
           it couldn't fetch any network statuses, and never tried again
           even when the network came back and arma clicked on things.
           also 0.2.0.
-        - phobos says relaybandwidth* sometimes don't do what we expect.
+        o phobos says relaybandwidth* sometimes don't do what we expect.
           http://interloper.org/tmp/2007-06-bw-usage.png
           I believe this is the result of confusion about whether to use
           relaybandwidth or bandwidthrate to control bandwidth usage for 

Modified: tor/trunk/src/or/circuitbuild.c
===================================================================
--- tor/trunk/src/or/circuitbuild.c	2007-12-02 11:22:42 UTC (rev 12637)
+++ tor/trunk/src/or/circuitbuild.c	2007-12-02 11:24:06 UTC (rev 12638)
@@ -506,8 +506,10 @@
   memcpy(cell.payload, payload, ONIONSKIN_CHALLENGE_LEN);
   append_cell_to_circuit_queue(circ, circ->n_conn, &cell, CELL_DIRECTION_OUT);
 
-  /* mark it so it gets better rate limiting treatment. */
-  circ->n_conn->client_used = time(NULL);
+  if (CIRCUIT_IS_ORIGIN(circ)) {
+    /* mark it so it gets better rate limiting treatment. */
+    circ->n_conn->client_used = time(NULL);
+  }
 
   return 0;
 }