[tor-bugs] #21910 [Core Tor/Tor]: Refactor connection_edge_process_relay_cell()
Tor Bug Tracker & Wiki
blackhole at torproject.org
Mon Apr 10 15:47:29 UTC 2017
#21910: Refactor connection_edge_process_relay_cell()
------------------------------+------------------------------
Reporter: dgoulet | Owner:
Type: enhancement | Status: new
Priority: Low | Milestone: Tor: unspecified
Component: Core Tor/Tor | Version:
Severity: Normal | Keywords: refactor, easy
Actual Points: | Parent ID:
Points: 1 | Reviewer:
Sponsor: |
------------------------------+------------------------------
Ticket #16706 is one of the possible many issues we had and will have with
this function.
It is quite big with many many return callsite and it is confusing on how
it behaves. For instance, if `-reason` is returned, the caller should
teardown the circuit and log warn but yet this functions already does many
`LOG_PROTOCOL_WARN` in that case.
One thing we could do is maybe return a different error code (or set an
error code) depending on what's happening (should close circ, cell
dropped, error). For instance, currently, returning 0 can either mean that
a cell was dropped or successfully relayed.
Auditing every callsite of this function would be important to understand
how it is actually used so we can properly improve it and make it less
error prone with dubious logging (or improved logging).
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/21910>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list