[tor-bugs] #19448 [Core Tor]: Total bandwidth incorrectly computed - missing non-guardfraction bw

Tor Bug Tracker & Wiki blackhole at torproject.org
Sun Jun 19 16:02:12 UTC 2016


#19448: Total bandwidth incorrectly computed - missing non-guardfraction bw
--------------------------+-----------------------------
     Reporter:  amj703    |      Owner:
         Type:  defect    |     Status:  new
     Priority:  Medium    |  Milestone:
    Component:  Core Tor  |    Version:  Tor: 0.2.8.4-rc
     Severity:  Normal    |   Keywords:
Actual Points:            |  Parent ID:
       Points:            |   Reviewer:
      Sponsor:            |
--------------------------+-----------------------------
 In or/dirvote.c, lines 1074-1085 we have that

 {{{
   if (rs->has_guardfraction) {
     guardfraction_bandwidth_t guardfraction_bw;

     tor_assert(is_guard);

     guard_get_guardfraction_bandwidth(&guardfraction_bw,
                                       rs->bandwidth_kb,
                                       rs->guardfraction_percentage);

     default_bandwidth = guardfraction_bw.guard_bw;
     guardfraction_bandwidth = guardfraction_bw.non_guard_bw;
   }
 }}}
 However, then in line 1093, we have

 {{{
   *T += default_bandwidth;
 }}}

 T here is the total bandwidth, for use in load balancing. I believe that
 it should hold that T = G+M+E+D, and it used to (in 0.2.5, before
 guardfractions were added). However, T now is missing the fraction of the
 guard bandwidth that is considered "non-guard" due to the use of
 guardfractions.

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


More information about the tor-bugs mailing list