diff options
author | Roger Dingledine <arma@torproject.org> | 2010-09-16 00:17:39 -0400 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2010-09-16 00:17:39 -0400 |
commit | 0ac67bf3c3aff13adccafb6ded303cb9f186d188 (patch) | |
tree | 1a1646f5c252df9674a5df475a6748fd29f9bbe4 | |
parent | 277295efc1689d6ce039fb474147ddf155fbf516 (diff) | |
download | tor-0ac67bf3c3aff13adccafb6ded303cb9f186d188.tar.gz tor-0ac67bf3c3aff13adccafb6ded303cb9f186d188.zip |
perconnbwrate and perconnbwburst consensus params
-rw-r--r-- | changes/bug1947 | 7 | ||||
-rw-r--r-- | doc/spec/dir-spec.txt | 9 | ||||
-rw-r--r-- | src/or/connection_or.c | 4 |
3 files changed, 18 insertions, 2 deletions
diff --git a/changes/bug1947 b/changes/bug1947 new file mode 100644 index 0000000000..598a3d20dc --- /dev/null +++ b/changes/bug1947 @@ -0,0 +1,7 @@ + o Minor features: + - Add new "perconnbwrate" and "perconnbwburst" consensus params to + do individual connection-level rate limiting of clients. The torrc + config options with the same names trump the consensus params, if + both are present. Replaces the old "bwconnrate" and "bwconnburst" + consensus params which were broken from 0.2.2.7-alpha through + 0.2.2.14-alpha. Closes bug 1947. diff --git a/doc/spec/dir-spec.txt b/doc/spec/dir-spec.txt index b383cdf403..e2ad056d47 100644 --- a/doc/spec/dir-spec.txt +++ b/doc/spec/dir-spec.txt @@ -1168,6 +1168,15 @@ and 0.2.2.10-alpha recognized a "CircPriorityHalflifeMsec" parameter, but mishandled it badly.) + "perconnbwrate" and "perconnbwburst" -- if set, each relay sets + up a separate token bucket for every client OR connection, + and rate limits that connection indepedently. Typically left + unset, except when used for performance experiments around trac + entry 1750. Only honored by relays running Tor 0.2.2.16-alpha + and later. (Note that relays running 0.2.2.7-alpha through + 0.2.2.14-alpha looked for bwconnrate and bwconnburst, but then + did the wrong thing with them; see bug 1830 for details.) + See also "2.4.5. Consensus parameters governing behavior" in path-spec.txt for a series of circuit build time related consensus params. diff --git a/src/or/connection_or.c b/src/or/connection_or.c index 4d82da63e9..58e8ec7e7e 100644 --- a/src/or/connection_or.c +++ b/src/or/connection_or.c @@ -370,10 +370,10 @@ connection_or_update_token_buckets_helper(or_connection_t *conn, int reset, * bandwidth parameters in the consensus, but allow local config * options to override. */ rate = options->PerConnBWRate ? (int)options->PerConnBWRate : - (int)networkstatus_get_param(NULL, "bwconnrate", + (int)networkstatus_get_param(NULL, "perconnbwrate", (int)options->BandwidthRate); burst = options->PerConnBWBurst ? (int)options->PerConnBWBurst : - (int)networkstatus_get_param(NULL, "bwconnburst", + (int)networkstatus_get_param(NULL, "perconnbwburst", (int)options->BandwidthBurst); } |