Просмотр исходного кода

We were ignoring our RelayBandwidthRate for the first 30 seconds
after opening a circuit -- even relayed circuits. Bugfix on
0.2.0.3-alpha.


svn:r12638

Roger Dingledine 16 лет назад
Родитель
Сommit
07dbaaac16
3 измененных файлов с 11 добавлено и 5 удалено
  1. 6 2
      ChangeLog
  2. 1 1
      doc/TODO
  3. 4 2
      src/or/circuitbuild.c

+ 6 - 2
ChangeLog

@@ -5,8 +5,12 @@ Changes in version 0.2.0.13-alpha - 2007-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

+ 1 - 1
doc/TODO

@@ -107,7 +107,7 @@ Things we'd like to do in 0.2.0.x:
           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 

+ 4 - 2
src/or/circuitbuild.c

@@ -506,8 +506,10 @@ circuit_deliver_create_cell(circuit_t *circ, uint8_t cell_type,
   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;
 }