[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #14918 [Tor]: Tor 0.2.6.2-alpha complaining about "no exits in consensus" but consensus actually seems fine



#14918: Tor 0.2.6.2-alpha complaining about "no exits in consensus" but consensus
actually seems fine
------------------------+----------------------------------
     Reporter:  fk      |      Owner:
         Type:  defect  |     Status:  reopened
     Priority:  normal  |  Milestone:  Tor: 0.2.6.x-final
    Component:  Tor     |    Version:  Tor: 0.2.6.2-alpha
   Resolution:          |   Keywords:  tor-relay regression
Actual Points:          |  Parent ID:
       Points:          |
------------------------+----------------------------------
Changes (by yawning):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 Ugh, at least this is easy I think.

 {{{
   /* All nodes with exit flag in ExitNodes option */
   count_usable_descriptors(&np, &nu, myexits, consensus, options, now,
                            options->ExitNodes,
 USABLE_DESCRIPTOR_EXIT_ONLY);
   log_debug(LD_NET,
             "%s: %d present, %d usable",
             "myexits",
             np,
             nu);

   /* Now compute the nodes in the ExitNodes option where which we don't
 know
    * what their exit policy is, or we know it permits something. */
   count_usable_descriptors(&np, &nu, myexits_unflagged,
                            consensus, options, now,
                            options->ExitNodes, USABLE_DESCRIPTOR_ALL);
   log_debug(LD_NET,
             "%s: %d present, %d usable",
             "myexits_unflagged (initial)",
             np,
             nu);

   SMARTLIST_FOREACH_BEGIN(myexits_unflagged, const node_t *, node) {
     if (node_has_descriptor(node) && node_exit_policy_rejects_all(node)) {
       SMARTLIST_DEL_CURRENT(myexits_unflagged, node);
       /* this node is not actually an exit */
       np--;
       /* this node is unusable as an exit */
       nu--;
     }
   } SMARTLIST_FOREACH_END(node);

   log_debug(LD_NET,
             "%s: %d present, %d usable",
             "myexits_unflagged (final)",
             np,
             nu);
 }}}

 With your torrc (and most `torrcs` that aren't doing testing or tinfoil
 hattery), options->ExitNodes is NULL, so the 2nd
 `count_usable_descriptors` is returning every single router in the
 consensus, with hilarious results.

 Give me a bit and I'll fix this.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/14918#comment:13>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs