[tor-bugs] #23318 [Core Tor/Tor]: compute_weighted_bandwidths: do not add 0.5 to final_weight

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Aug 24 19:57:51 UTC 2017


#23318: compute_weighted_bandwidths: do not add 0.5 to final_weight
--------------------------+------------------------
 Reporter:  cypherpunks   |          Owner:  (none)
     Type:  defect        |         Status:  new
 Priority:  Medium        |      Milestone:
Component:  Core Tor/Tor  |        Version:
 Severity:  Normal        |     Resolution:
 Keywords:                |  Actual Points:
Parent ID:                |         Points:
 Reviewer:                |        Sponsor:
--------------------------+------------------------

Comment (by cypherpunks):

 I think in original code 0.5 contradicts to tor_llround(), it should be
 (int64_t)(weight*this_bw + 0.5) or tor_llround(weight*this_bw)

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/23318#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list