summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-01-16 14:50:22 -0500
committerNick Mathewson <nickm@torproject.org>2012-01-16 14:50:22 -0500
commit79bb44c219af8f88573fb33954e5d2e16ef8fe42 (patch)
tree09ce65ce0e4fd777693d9a3a1230358a3c838988 /src
parent1810db9bb32d2e9a1a1fe751368a98edc4524331 (diff)
parent88698993a954d15b2f294ff2631f3c5718e44fe9 (diff)
downloadtor-79bb44c219af8f88573fb33954e5d2e16ef8fe42.tar.gz
tor-79bb44c219af8f88573fb33954e5d2e16ef8fe42.zip
Merge branch 'feature3946_squashed'
Diffstat (limited to 'src')
-rw-r--r--src/or/control.c1
-rw-r--r--src/or/dirserv.c12
2 files changed, 12 insertions, 1 deletions
diff --git a/src/or/control.c b/src/or/control.c
index a93994606d..60c62b15a5 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -3482,7 +3482,6 @@ control_event_circuit_cannibalized(origin_circuit_t *circ,
old_tv_created);
}
-
/** Given an AP connection <b>conn</b> and a <b>len</b>-character buffer
* <b>buf</b>, determine the address:port combination requested on
* <b>conn</b>, and write it to <b>buf</b>. Return 0 on success, -1 on
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 94a415fe21..e5995697dd 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -1938,6 +1938,18 @@ dirserv_compute_performance_thresholds(routerlist_t *rl)
if (guard_tk > TIME_KNOWN_TO_GUARANTEE_FAMILIAR)
guard_tk = TIME_KNOWN_TO_GUARANTEE_FAMILIAR;
+ {
+ /* We can vote on a parameter for the minimum and maximum. */
+ int32_t min_fast, max_fast;
+ min_fast = networkstatus_get_param(NULL, "FastFlagMinThreshold",
+ 0, 0, INT32_MAX);
+ max_fast = networkstatus_get_param(NULL, "FastFlagMaxThreshold",
+ INT32_MAX, min_fast, INT32_MAX);
+ if (fast_bandwidth < (uint32_t)min_fast)
+ fast_bandwidth = min_fast;
+ if (fast_bandwidth > (uint32_t)max_fast)
+ fast_bandwidth = max_fast;
+ }
/* Protect sufficiently fast nodes from being pushed out of the set
* of Fast nodes. */
if (options->AuthDirFastGuarantee &&