tor

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

commit 5e768d5cb98ef8bae1b76c30610dfe21f17a3fda
parent d0c2d4cb431e86e7637ad6d917a52ae4ea25b256
Author: Roger Dingledine <arma@torproject.org>
Date:   Thu, 30 Jun 2022 21:46:21 -0400

we were sorting our pqueue the wrong way

i.e. we were putting higher effort intro2 cells at the *end*

Diffstat:
Msrc/feature/hs/hs_circuit.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/feature/hs/hs_circuit.c b/src/feature/hs/hs_circuit.c @@ -616,12 +616,12 @@ cleanup_on_free_client_circ(circuit_t *circ) } /** Return less than 0 if a precedes b, 0 if a equals b and greater than 0 if - * b precedes a. */ + * b precedes a. Note that *higher* effort is *earlier* in the pqueue. */ static int compare_rend_request_by_effort_(const void *_a, const void *_b) { const pending_rend_t *a = _a, *b = _b; - if (a->rdv_data.pow_effort < b->rdv_data.pow_effort) { + if (a->rdv_data.pow_effort > b->rdv_data.pow_effort) { return -1; } else if (a->rdv_data.pow_effort == b->rdv_data.pow_effort) { return 0;