diff options
author | Mike Perry <mikeperry-git@torproject.org> | 2023-06-08 22:44:26 +0000 |
---|---|---|
committer | Mike Perry <mikeperry-git@torproject.org> | 2023-06-09 16:29:10 +0000 |
commit | da50d21c42b43ede01bad48d205db67e6eed8bd2 (patch) | |
tree | 9622bf1e39bf913654aff61977002cd4be839feb /src/core | |
parent | ff59e2f490c2ee2f119bfe85e7d95cd7e0bb51fa (diff) | |
download | tor-da50d21c42b43ede01bad48d205db67e6eed8bd2.tar.gz tor-da50d21c42b43ede01bad48d205db67e6eed8bd2.zip |
Bug 40801: Send LINKED_ACK before attaching streams
Otherwise, the BEGIN cell arrives at the exit before it has an RTT,
and then it does not know which circuit to prefer in response.
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/or/conflux_pool.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/or/conflux_pool.c b/src/core/or/conflux_pool.c index 7e38e151a8..c8018f45e2 100644 --- a/src/core/or/conflux_pool.c +++ b/src/core/or/conflux_pool.c @@ -797,11 +797,6 @@ try_finalize_set(unlinked_circuits_t *unlinked) unlinked->cfx = NULL; unlinked_free(unlinked); - /* Now that this set is ready to use, try any pending streams again. */ - if (is_client) { - connection_ap_attach_pending(1); - } - log_info(LD_CIRC, "Successfully linked a conflux %s set which is now usable.", is_client ? "client" : "relay"); @@ -1964,6 +1959,12 @@ conflux_process_linked(circuit_t *circ, crypt_path_t *layer_hint, goto end; } + /* If this set is ready to use with a valid conflux set, try any pending + * streams again. */ + if (circ->conflux) { + connection_ap_attach_pending(1); + } + goto end; close: |