diff options
author | Mike Perry <mikeperry-git@torproject.org> | 2022-02-03 12:01:23 +0000 |
---|---|---|
committer | Mike Perry <mikeperry-git@torproject.org> | 2022-02-22 19:28:35 +0000 |
commit | b2553bfba28b2e26f09041a3d78fa39c35fd4ac8 (patch) | |
tree | 896677eaf525afbe5decee7c628b5d73b6e5a7b8 /src/core/mainloop | |
parent | 0a6cde8756423336c8e6901b55c31d67a2a35245 (diff) | |
download | tor-b2553bfba28b2e26f09041a3d78fa39c35fd4ac8.tar.gz tor-b2553bfba28b2e26f09041a3d78fa39c35fd4ac8.zip |
Use path type hint for Vegas queue parameters.
These parameters will vary depending on path length, especially for onions.
Diffstat (limited to 'src/core/mainloop')
-rw-r--r-- | src/core/mainloop/cpuworker.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/core/mainloop/cpuworker.c b/src/core/mainloop/cpuworker.c index 2cb667615d..ab970259b5 100644 --- a/src/core/mainloop/cpuworker.c +++ b/src/core/mainloop/cpuworker.c @@ -391,7 +391,13 @@ cpuworker_onion_handshake_replyfn(void *work_) /* If the client asked for congestion control, if our consensus parameter * allowed it to negotiate as enabled, allocate a congestion control obj. */ if (rpl.circ_params.cc_enabled) { - TO_CIRCUIT(circ)->ccontrol = congestion_control_new(&rpl.circ_params); + if (get_options()->SbwsExit) { + TO_CIRCUIT(circ)->ccontrol = congestion_control_new(&rpl.circ_params, + CC_PATH_SBWS); + } else { + TO_CIRCUIT(circ)->ccontrol = congestion_control_new(&rpl.circ_params, + CC_PATH_EXIT); + } } if (onionskin_answer(circ, |