mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-20 10:12:15 +01:00
Merge branch 'feature3946_squashed'
This commit is contained in:
commit
79bb44c219
8
changes/fast_bw_param
Normal file
8
changes/fast_bw_param
Normal file
@ -0,0 +1,8 @@
|
||||
o Minor features (directory authority):
|
||||
- Provide two consensus parameters (FastFlagMinThreshold and
|
||||
FastFlagMaxThreshold) to control the range of allowable bandwidths for
|
||||
the Fast directory flag. This allows authorities to run better
|
||||
experiments on appropriate requirements for being a "Fast" node.
|
||||
The AuthDirFastGuarantee flag still applies.
|
||||
|
||||
|
@ -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
|
||||
|
@ -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 &&
|
||||
|
Loading…
Reference in New Issue
Block a user