Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #13790

Closed (moved)
Open
Opened Nov 19, 2014 by David Goulet@dgoulet😈

Refactor and add comments to new_route_len()

(function in src/or/circuitbuild.c)

At the moment, this function is kind of scary and it should be refactored and heavily documented to avoid future confusion. (This ticket exists because two different developers at different time span over a week expressed concerns about the behavior of HS and this function).

Bit of info on new_route_len(), this function is called to possibly extend a circuit with an extra hop that matches specific purpose(s). Right now it's testing the given purpose if it is not ESTABLISH_INTRO and TESTING, it will extend it to 4 hops (with exit information).

However, there are other purposes that do NOT need 4 hops. Fortunately, it seems that there are no code paths that end up calling this function with exit info and a purpose that should not be extended (investigated by special, sysrqb, asn and me). But, we all agree that this is very fragile thus the purpose condition in this function should be applied on only purposes that need 4 hops.

Furthermore, add more comments to make sure no more confusion happens with that fairly important function.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Tor: 0.3.1.x-final
Milestone
Tor: 0.3.1.x-final
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#13790