aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/circuitbuild.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2021-09-14 15:15:30 -0400
committerMike Perry <mikeperry-git@torproject.org>2022-02-22 19:28:33 +0000
commit244444e8b1ac36bf9148aa656e4eb9e293daa5b4 (patch)
treea4a05af33221374e7b6e254c216bcad08699bbcc /src/core/or/circuitbuild.c
parent358ce9a19d522d1e1cf9a119850e924ca106fec5 (diff)
downloadtor-244444e8b1ac36bf9148aa656e4eb9e293daa5b4.tar.gz
tor-244444e8b1ac36bf9148aa656e4eb9e293daa5b4.zip
Add an exported struct to onion handshakes for circuits params
THis will eventually hold the congestion control parameters that we negotiated, plus whatever else is relevant.
Diffstat (limited to 'src/core/or/circuitbuild.c')
-rw-r--r--src/core/or/circuitbuild.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/or/circuitbuild.c b/src/core/or/circuitbuild.c
index dc8d888c97..f67fe196e5 100644
--- a/src/core/or/circuitbuild.c
+++ b/src/core/or/circuitbuild.c
@@ -1242,6 +1242,7 @@ circuit_finish_handshake(origin_circuit_t *circ,
}
tor_assert(hop->state == CPATH_STATE_AWAITING_KEYS);
+ circuit_params_t params;
{
const char *msg = NULL;
if (onion_skin_client_handshake(hop->handshake_state.tag,
@@ -1249,6 +1250,7 @@ circuit_finish_handshake(origin_circuit_t *circ,
reply->reply, reply->handshake_len,
(uint8_t*)keys, sizeof(keys),
(uint8_t*)hop->rend_circ_nonce,
+ &params,
&msg) < 0) {
if (msg)
log_warn(LD_CIRC,"onion_skin_client_handshake failed: %s", msg);
@@ -1258,6 +1260,8 @@ circuit_finish_handshake(origin_circuit_t *circ,
onion_handshake_state_release(&hop->handshake_state);
+ // XXXX TODO: use `params` to initialize the congestion control.
+
if (cpath_init_circuit_crypto(hop, keys, sizeof(keys), 0, 0)<0) {
return -END_CIRC_REASON_TORPROTOCOL;
}