Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Tor Tor
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 832
    • Issues 832
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 31
    • Merge requests 31
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Core
  • TorTor
  • Issues
  • #17903

Closed
Open
Created Dec 20, 2015 by teor@teor

router_pick_trusteddirserver_impl should distinguish between fallbacks and authorities

router_pick_directory_server_impl currently prioritises directories in the following order:

  • tunneled
    • mirrors
    • overloaded mirrors
    • authorities (trusted)
  • direct
    • mirrors
    • overloaded mirrors
    • authorities (trusted)

But router_pick_trusteddirserver_impl uses the following order:

  • tunneled
    • fallbacks + authorities
    • overloaded fallbacks + authorities
  • direct
    • fallbacks + authorities
    • overloaded fallbacks + authorities

I suggest we change it to:

  • tunneled
    • fallbacks
    • overloaded fallbacks
    • authorities
  • direct
    • fallbacks
    • overloaded fallbacks
    • authorities

We should do this for consistency, and to help with legacy/trac#17847 (moved) (unifying these two functions).

(This doesn't make much practical difference, because authorities are weighted 1.0, and fallbacks are weighted ~100,000.0, so authorities get selected very rarely. However, this would modify the effect of the DirAuthorityFallbackRate torrc option.)

If we do this, let's refactor the code so it's all in one place, probably using a macro.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking