[tor-bugs] #14327 [Torflow]: bwauth crash when one or more of the relay classes are not measured

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Jan 22 14:25:07 UTC 2015


#14327: bwauth crash when one or more of the relay classes are not measured
---------------------+------------------------
 Reporter:  ln5      |          Owner:  aagbsn
     Type:  defect   |         Status:  new
 Priority:  normal   |      Milestone:
Component:  Torflow  |        Version:
 Keywords:           |  Actual Points:
Parent ID:           |         Points:
---------------------+------------------------
 This code will crash when one or more of the relay classes are not
 represented in 'nodes', i.e. when c_node is empty:

     for cl in ["Guard+Exit", "Guard", "Exit", "Middle"]:
       c_nodes = filter(lambda n: n.node_class() == cl, nodes.itervalues())
       true_filt_avg[cl] = sum(map(lambda n: n.filt_bw,
 c_nodes))/float(len(c_node\
       true_strm_avg[cl] = sum(map(lambda n: n.strm_bw,
 c_nodes))/float(len(c_node\
 s))
       true_circ_avg[cl] = sum(map(lambda n: (1.0-n.circ_fail_rate),
                                   c_nodes))/float(len(c_nodes))

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


More information about the tor-bugs mailing list