[tor-bugs] #24927 [Core Tor/Tor]: if (n_chan_id) in circuit_build_failed() can't fail
Tor Bug Tracker & Wiki
blackhole at torproject.org
Fri Jan 26 18:36:02 UTC 2018
#24927: if (n_chan_id) in circuit_build_failed() can't fail
--------------------------+------------------------------------
Reporter: arma | Owner: nickm
Type: defect | Status: accepted
Priority: Medium | Milestone: Tor: 0.3.3.x-final
Component: Core Tor/Tor | Version: Tor: 0.2.4.4-alpha
Severity: Normal | Resolution:
Keywords: | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
--------------------------+------------------------------------
Changes (by nickm):
* status: new => accepted
* owner: (none) => nickm
Comment:
I think you're right: the only call here that matters is
connection_ap_fail_onehop(), which will get called with `failed_digest`
set to an all-zero identity. And if that happens, and the digest matches,
we will still compare on address:port instead, since we check for
digest_is_zero().
Because of that check in connection_ap_fail_onehop(), I think we should
just remove the test here. I'm turning it into an assertion, and renaming
the variable a bit.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/24927#comment:3>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list