diff options
author | Nick Mathewson <nickm@torproject.org> | 2010-02-25 14:32:22 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-02-25 14:32:22 -0500 |
commit | 8b93dacbcfbca7b4653f7a9b727bdc209aff1e7c (patch) | |
tree | 14787a1166bf37c4a0945f06eb0e513e6f9d7741 | |
parent | cf886e296c194ff715c4974b988a684cc900e3b8 (diff) | |
parent | 2917c0596c82a79ab814f30a43968bf78da8c3a9 (diff) | |
download | tor-8b93dacbcfbca7b4653f7a9b727bdc209aff1e7c.tar tor-8b93dacbcfbca7b4653f7a9b727bdc209aff1e7c.tar.gz |
Merge remote branch 'sebastian/manpage'
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | doc/tor.1.txt | 14 | ||||
-rw-r--r-- | src/or/config.c | 6 |
3 files changed, 15 insertions, 7 deletions
@@ -5,6 +5,8 @@ Changes in version 0.2.2.10-alpha - 2010-??-?? - Fix a dereference-then-NULL-check sequence when publishing descriptors. Bugfix on tor-0.2.1.5-alpha. Discovered by ekir, fixes bug 1255. + - Disallow values larger than INT32_MAX for PerConnBWRate|Burst + config option. Bugfix on 0.2.2.7-alpha. o Code simplifications and refactoring: - Fix some urls in the exit notice file and make it XHTML1.1 strict diff --git a/doc/tor.1.txt b/doc/tor.1.txt index 04b764ad6..d999344b4 100644 --- a/doc/tor.1.txt +++ b/doc/tor.1.txt @@ -66,40 +66,40 @@ Other options can be specified either on the command-line (--option Options are case-insensitive. C-style escaped characters are allowed inside quoted values. -**BandwidthRate** __N__ **bytes**|**KB**|**MB**|**GB**|**TB**:: +**BandwidthRate** __N__ **bytes**|**KB**|**MB**|**GB**:: A token bucket limits the average incoming bandwidth usage on this node to the specified number of bytes per second, and the average outgoing bandwidth usage to that same value. (Default: 5 MB) -**BandwidthBurst** __N__ **bytes**|**KB**|**MB**|**GB**|**TB**:: +**BandwidthBurst** __N__ **bytes**|**KB**|**MB**|**GB**:: Limit the maximum token bucket size (also known as the burst) to the given number of bytes in each direction. (Default: 10 MB) -**MaxAdvertisedBandwidth** __N__ **bytes**|**KB**|**MB**|**GB**|**TB**:: +**MaxAdvertisedBandwidth** __N__ **bytes**|**KB**|**MB**|**GB**:: If set, we will not advertise more than this amount of bandwidth for our BandwidthRate. Server operators who want to reduce the number of clients who ask to build circuits through them (since this is proportional to advertised bandwidth rate) can thus reduce the CPU demands on their server without impacting network performance. -**RelayBandwidthRate** __N__ **bytes**|**KB**|**MB**|**GB**|**TB**:: +**RelayBandwidthRate** __N__ **bytes**|**KB**|**MB**|**GB**:: If defined, a separate token bucket limits the average incoming bandwidth usage for \_relayed traffic_ on this node to the specified number of bytes per second, and the average outgoing bandwidth usage to that same value. Relayed traffic currently is calculated to include answers to directory requests, but that may change in future versions. (Default: 0) -**RelayBandwidthBurst** __N__ **bytes**|**KB**|**MB**|**GB**|**TB**:: +**RelayBandwidthBurst** __N__ **bytes**|**KB**|**MB**|**GB**:: Limit the maximum token bucket size (also known as the burst) for \_relayed traffic_ to the given number of bytes in each direction. (Default: 0) -**PerConnBWRate** __N__ **bytes**|**KB**|**MB**|**GB**|**TB**:: +**PerConnBWRate** __N__ **bytes**|**KB**|**MB**|**GB**:: If set, do separate rate limiting for each connection from a non-relay. You should never need to change this value, since a network-wide value is published in the consensus and your relay will use that value. (Default: 0) -**PerConnBWBurst** __N__ **bytes**|**KB**|**MB**|**GB**|**TB**:: +**PerConnBWBurst** __N__ **bytes**|**KB**|**MB**|**GB**:: If set, do separate rate limiting for each connection from a non-relay. You should never need to change this value, since a network-wide value is published in the consensus and your relay will use that value. (Default: 0) diff --git a/src/or/config.c b/src/or/config.c index 5ad1d3f44..c9ff92173 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -3228,6 +3228,12 @@ options_validate(or_options_t *old_options, or_options_t *options, if (ensure_bandwidth_cap(&options->RelayBandwidthBurst, "RelayBandwidthBurst", msg) < 0) return -1; + if (ensure_bandwidth_cap(&options->PerConnBWRate, + "PerConnBWRate", msg) < 0) + return -1; + if (ensure_bandwidth_cap(&options->PerConnBWBurst, + "PerConnBWBurst", msg) < 0) + return -1; if (server_mode(options)) { if (options->BandwidthRate < ROUTER_REQUIRED_MIN_BANDWIDTH) { |