aboutsummaryrefslogtreecommitdiff
path: root/src/core/mainloop
diff options
context:
space:
mode:
authorMike Perry <mikeperry-git@torproject.org>2022-02-03 12:01:23 +0000
committerMike Perry <mikeperry-git@torproject.org>2022-02-22 19:28:35 +0000
commitb2553bfba28b2e26f09041a3d78fa39c35fd4ac8 (patch)
tree896677eaf525afbe5decee7c628b5d73b6e5a7b8 /src/core/mainloop
parent0a6cde8756423336c8e6901b55c31d67a2a35245 (diff)
downloadtor-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.c8
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,