tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit 914ec372a9352308c3990afb5304f7e8d39b1020
parent 80c8689be1d0b6d926752059b51966d398f7c184
Author: Nick Mathewson <nickm@torproject.org>
Date:   Wed, 31 Jan 2018 09:47:36 -0500

Merge branch 'bug24927'

Diffstat:
Achanges/bug24927 | 4++++
Msrc/or/circuituse.c | 7++++---
2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/changes/bug24927 b/changes/bug24927 @@ -0,0 +1,4 @@ + o Minor bugfixes (correctness): + - Remove nonworking, unnecessary check to see whether a circuit hop's + identity was set when the circuit failed. Fixes bug 24927; bugfix on + 0.2.4.4-alpha. diff --git a/src/or/circuituse.c b/src/or/circuituse.c @@ -1773,7 +1773,8 @@ circuit_build_failed(origin_circuit_t *circ) /* We failed at the first hop for some reason other than a DESTROY cell. * If there's an OR connection to blame, blame it. Also, avoid this relay * for a while, and fail any one-hop directory fetches destined for it. */ - const char *n_chan_id = circ->cpath->extend_info->identity_digest; + const char *n_chan_ident = circ->cpath->extend_info->identity_digest; + tor_assert(n_chan_ident); int already_marked = 0; if (circ->base_.n_chan) { n_chan = circ->base_.n_chan; @@ -1801,7 +1802,7 @@ circuit_build_failed(origin_circuit_t *circ) "with no connection", TO_CIRCUIT(circ)->n_circ_id, circ->global_identifier); } - if (n_chan_id && !already_marked) { + if (!already_marked) { /* * If we have guard state (new guard API) and our path selection * code actually chose a full path, then blame the failure of this @@ -1821,7 +1822,7 @@ circuit_build_failed(origin_circuit_t *circ) entry_guard_failed(&circ->guard_state); /* if there are any one-hop streams waiting on this circuit, fail * them now so they can retry elsewhere. */ - connection_ap_fail_onehop(n_chan_id, circ->build_state); + connection_ap_fail_onehop(n_chan_ident, circ->build_state); } }