Opened 8 months ago

Last modified 2 months ago

#30267 new defect

Simplify the code logic of launching HS circuits

Reported by: asn Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-hs refactoring tech-debt easy
Cc: neel Actual Points:
Parent ID: Points: 1
Reviewer: Sponsor:

Description

The intro/rendezvous parts of circuit_get_open_circ_or_launch() are very complicated, and then they call circuit_get_open_circ_or_launch() which is also extremely complicated.

A minimal action item for improving the situation here would be to split the HS-parts of connection_ap_handshake_attach_circuit() which are already pretty disentangled into their own function. That's pretty easy to do.

The harder part of this would be to see if we can also split the HS parts of circuit_get_open_circ_or_launch() in some way.

Child Tickets

Change History (4)

comment:1 Changed 8 months ago by dgoulet

Agree +9000. Also, sending the INTRODUCE1 cell shouldn't be handled there but rather when the intro circuit state becomes open in the has_opened() function.

comment:2 Changed 7 months ago by neel

Cc: neel added
Owner: set to neel
Status: newassigned

comment:3 Changed 2 months ago by neel

Owner: neel deleted

comment:4 Changed 2 months ago by neel

Status: assignednew
Note: See TracTickets for help on using tickets.