mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 21:53:48 +01:00
640a51684c
The old approach, because of its "tmp >= rand_bw && !i_has_been_chosen" check, would run through the second part of the loop slightly slower than the first part. Now, we remove i_has_been_chosen, and instead set rand_bw = UINT64_MAX, so that every instance of the loop will do exactly the same amount of work regardless of the initial value of rand_bw. Fix for bug 6538.
13 lines
562 B
Plaintext
13 lines
562 B
Plaintext
o Minor bugfixes:
|
|
- Switch weighted node selection rule from using a list of doubles
|
|
to using a list of int64_t. This should make the process slightly
|
|
easier to debug and maintain. Needed for fix for bug 6538.
|
|
|
|
o Security features:
|
|
- Switch to a completely time-invariant approach for picking nodes
|
|
weighted by bandwidth. Our old approach would run through the
|
|
part of the loop after it had made its choice slightly slower
|
|
than it ran through the part of the loop before it had made its
|
|
choice. Fix for bug 6538.
|
|
|