[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #13790 [Tor]: Refactor and add comments to new_route_len()
#13790: Refactor and add comments to new_route_len()
-------------------------+---------------------
Reporter: dgoulet | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Tor | Version:
Keywords: | Actual Points:
Parent ID: | Points:
-------------------------+---------------------
(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.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/13790>
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