Opened 6 years ago

Last modified 2 years ago

#13297 new defect

compute_weighted_bandwidths() broken for dirauths

Reported by: asn Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-dirauth routing weighting
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


I suspect that compute_weighted_bandwidths() is broken for dirauths. All the booleans is_guard, is_exit, etc. are populated according to the node_t.

However, nodelist_set_consensus() which creates those node_ts does not fill in those fields if we are a dirauth:

    if (!authdir) {
      node->is_valid = rs->is_valid;
      node->is_running = rs->is_flagged_running;
      node->is_fast = rs->is_fast;
      node->is_stable = rs->is_stable;
      node->is_possible_guard = rs->is_possible_guard;

I don't think this has any big implications, but dirauths are probably doing the wrong path selection. Maybe it's more important if someone is doing bwauth measurements using the dirauth code (if that even makes sense).

Child Tickets

Change History (3)

comment:1 Changed 6 years ago by arma

For context, the goal of that if (!authdir) { check was to let the directory authority make (and remember) its own decision about each of those flags. Otherwise it would compute e.g. which relay should be Stable, and then overwrite that decision as soon as it sees a consensus document.

That said, you're right that a side effect of this choice is that dir auths have their own opinions about relays, which probably differs in some ways from the consensus opinion about the relays.

Sounds like another argument in favor of making dir auths into special unicorns that e.g. don't act as normal relays.

comment:2 Changed 3 years ago by nickm

Keywords: tor-dirauth routing weighting added
Severity: Normal

comment:3 Changed 2 years ago by teor

Do DirAuths need to build any multi-hop circuits?

If we turned off entry guards and preemptive circuits on DirAuths, they would never use these weights.

Note: See TracTickets for help on using tickets.