summaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorDaniel Cagara <Daniel.Cagara@uni-dusseldorf.de>2011-04-05 14:50:32 -0400
committerNick Mathewson <nickm@torproject.org>2011-04-05 16:24:01 -0400
commite61f3293e479bb6cadb87026937402a3c440f513 (patch)
treefc8882c3381705116eb4652ead35d1a2bae5e4d0 /src/or/connection.c
parent3a9d0b4b9c0460c73c67fa5e6a64711a95df1b91 (diff)
downloadtor-e61f3293e479bb6cadb87026937402a3c440f513.tar.gz
tor-e61f3293e479bb6cadb87026937402a3c440f513.zip
Patch from cagara: Add a CountPrivateBandwidth flag
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index d5577765e7..953f402317 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -1953,9 +1953,10 @@ retry_all_listeners(smartlist_t *replaced_conns,
static int
connection_is_rate_limited(connection_t *conn)
{
+ or_options_t *options = get_options();
if (conn->linked || /* internal connection */
- tor_addr_family(&conn->addr) == AF_UNSPEC || /* no address */
- tor_addr_is_internal(&conn->addr, 0)) /* internal address */
+ (options->CountPrivateBandwidth==1 && ( tor_addr_family(&conn->addr) == AF_UNSPEC || /* no address */
+ tor_addr_is_internal(&conn->addr, 0)))) /* internal address */
return 0;
else
return 1;