tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit b780e84f256796870857259c16489e90a75a63c7
parent ea5ea5f5542b314d3365a09427cf74340b5093e4
Author: Nick Mathewson <nickm@torproject.org>
Date:   Tue,  7 Nov 2017 20:36:04 -0500

Merge branch 'maint-0.3.2'

Diffstat:
Dchanges/bug23318 | 7-------
Msrc/or/routerlist.c | 2+-
2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/changes/bug23318 b/changes/bug23318 @@ -1,7 +0,0 @@ - o Minor bugfixes (path selection): - - When selecting relays by bandwidth, avoid a rounding error that - could sometimes cause load to be imbalanced incorrectly. Previously, - we would always round upwards; now, we round towards the nearest - integer. This had the biggest effect when a relay's weight adjustments - should have given it weight 0, but it got weight 1 instead. - Fixes bug 23318; bugfix on 0.2.4.3-alpha. diff --git a/src/or/routerlist.c b/src/or/routerlist.c @@ -2706,7 +2706,7 @@ compute_weighted_bandwidths(const smartlist_t *sl, final_weight = weight*this_bw; } - bandwidths[node_sl_idx] = final_weight; + bandwidths[node_sl_idx] = final_weight + 0.5; } SMARTLIST_FOREACH_END(node); log_debug(LD_CIRC, "Generated weighted bandwidths for rule %s based "