[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/main] Convert TODO into TODO-324 for better visibility.
commit 93318ba5e21851f486e148ff216d239c4ca25ce7
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Tue Sep 14 17:23:31 2021 -0400
Convert TODO into TODO-324 for better visibility.
---
src/core/crypto/onion_crypto.c | 21 ++++++++++-----------
src/core/mainloop/cpuworker.c | 2 +-
src/core/or/circuitbuild.c | 4 ++--
src/core/or/command.c | 4 ++--
src/core/or/congestion_control_common.c | 4 ++--
src/core/or/congestion_control_common.h | 6 +++++-
src/core/or/or.h | 2 +-
src/core/or/protover.c | 4 ++--
src/core/or/versions.c | 2 +-
src/feature/hs/hs_common.c | 11 +++++++++--
10 files changed, 35 insertions(+), 25 deletions(-)
diff --git a/src/core/crypto/onion_crypto.c b/src/core/crypto/onion_crypto.c
index 390151b5df..1e9913539f 100644
--- a/src/core/crypto/onion_crypto.c
+++ b/src/core/crypto/onion_crypto.c
@@ -47,7 +47,7 @@
#include "core/or/crypt_path_st.h"
#include "core/or/extend_info_st.h"
-/* TODO: Add this to the specification! */
+/* TODO-324: Add this to the specification! */
const uint8_t NTOR3_CIRC_VERIFICATION[] = "circuit extend";
const size_t NTOR3_CIRC_VERIFICATION_LEN = 14;
@@ -233,7 +233,7 @@ onion_skin_server_handshake(int type,
circuit_params_t *params_out)
{
int r = -1;
- memset(params_out, 0, sizeof(*params_out)); // TODO: actually set.
+ memset(params_out, 0, sizeof(*params_out)); // TODO-324: actually set this!
switch (type) {
case ONION_HANDSHAKE_TYPE_TAP:
@@ -306,10 +306,10 @@ onion_skin_server_handshake(int type,
uint8_t reply_msg[1] = { 0 };
size_t reply_msg_len = 1;
{
- /* TODO, Okay, we have a message from the client trying to negotiate
- * parameters. We need to decide whether the client's request is
- * okay, what we're going to say in response, and what circuit
- * parameters we've just negotiated
+ /* TODO-324, Okay, we have a message from the client trying to negotiate
+ * parameters. We need to decide whether the client's request is okay,
+ * what we're going to say in response, and what circuit parameters
+ * we've just negotiated
*/
/* NOTE! DANGER, DANGER, DANGER!
@@ -331,12 +331,12 @@ onion_skin_server_handshake(int type,
reply_msg, reply_msg_len,
&server_handshake, &server_handshake_len,
keys_tmp, keys_tmp_len) < 0) {
- // XXX TODO free some stuff
+ // XXX TODO-324 free some stuff
return -1;
}
if (server_handshake_len > reply_out_maxlen) {
- // XXX TODO free that stuff
+ // XXX TODO-324 free that stuff
return -1;
}
@@ -382,7 +382,7 @@ onion_skin_client_handshake(int type,
if (handshake_state->tag != type)
return -1;
- memset(params_out, 0, sizeof(*params_out)); // TODO: actually set.
+ memset(params_out, 0, sizeof(*params_out)); // TODO-324: actually set this!
switch (type) {
case ONION_HANDSHAKE_TYPE_TAP:
@@ -450,9 +450,8 @@ onion_skin_client_handshake(int type,
return -1;
}
- // XXXX handle the server message!
{
- // XXXX TODO: see what the server said, make sure it's okay, see what
+ // XXXX TODO-324: see what the server said, make sure it's okay, see what
// parameters it gave us, make sure we like them, and put them into
// `params_out`
}
diff --git a/src/core/mainloop/cpuworker.c b/src/core/mainloop/cpuworker.c
index 8da042aa57..7ca66a1c45 100644
--- a/src/core/mainloop/cpuworker.c
+++ b/src/core/mainloop/cpuworker.c
@@ -390,7 +390,7 @@ cpuworker_onion_handshake_replyfn(void *work_)
goto done_processing;
}
- /* TODO! We need to use rpl.circ_params here to initialize the congestion
+ /* TODO-324! We need to use rpl.circ_params here to initialize the congestion
control parameters of the circuit. */
log_debug(LD_OR,"onionskin_answer succeeded. Yay.");
diff --git a/src/core/or/circuitbuild.c b/src/core/or/circuitbuild.c
index ffb2c00493..53582d2829 100644
--- a/src/core/or/circuitbuild.c
+++ b/src/core/or/circuitbuild.c
@@ -1263,7 +1263,7 @@ circuit_finish_handshake(origin_circuit_t *circ,
onion_handshake_state_release(&hop->handshake_state);
- // XXXX TODO: use `params` to initialize the congestion control.
+ // XXXX TODO-324: use `params` to initialize the congestion control.
if (cpath_init_circuit_crypto(hop, keys, sizeof(keys), 0, 0)<0) {
return -END_CIRC_REASON_TORPROTOCOL;
@@ -2600,6 +2600,6 @@ client_circ_negotiation_message(const extend_info_t *ei,
if (! ei->supports_ntor3_and_param_negotiation)
return -1;
- /* TODO: fill in the client message that gets sent. */
+ /* TODO-324: fill in the client message that gets sent. */
tor_assert_unreached();
}
diff --git a/src/core/or/command.c b/src/core/or/command.c
index fd6cebe743..12e4c26768 100644
--- a/src/core/or/command.c
+++ b/src/core/or/command.c
@@ -381,8 +381,8 @@ command_process_create_cell(cell_t *cell, channel_t *chan)
created_cell.cell_type = CELL_CREATED_FAST;
created_cell.handshake_len = len;
- // TODO: We should in theory look at params here, though it will always
- // tell us to use the old-fashioned congestion control.
+ // TODO-324: We should in theory look at params here, though it will
+ // always tell us to use the old-fashioned congestion control.
if (onionskin_answer(circ, &created_cell,
(const char *)keys, sizeof(keys),
diff --git a/src/core/or/congestion_control_common.c b/src/core/or/congestion_control_common.c
index f2becb9b20..b76c0957e4 100644
--- a/src/core/or/congestion_control_common.c
+++ b/src/core/or/congestion_control_common.c
@@ -277,10 +277,10 @@ congestion_control_new(const circuit_params_t *params)
{
congestion_control_t *cc = tor_malloc_zero(sizeof(congestion_control_t));
- /* TODO: Use `params` to pick the algorithm and the window. */
+ /* TODO-324: Use `params` to pick the algorithm and the window. */
(void) params;
- // XXX: the alg and the sendme_inc need to be negotiated during
+ // TODO-324: XXX: the alg and the sendme_inc need to be negotiated during
// circuit handshake
congestion_control_init(cc, CC_ALG_VEGAS, SENDME_INC_DFLT);
diff --git a/src/core/or/congestion_control_common.h b/src/core/or/congestion_control_common.h
index 1c44e6b0ef..81ec79c6e6 100644
--- a/src/core/or/congestion_control_common.h
+++ b/src/core/or/congestion_control_common.h
@@ -20,7 +20,11 @@ typedef struct congestion_control_t congestion_control_t;
void congestion_control_free_(congestion_control_t *cc);
-/* TODO: Whisky Tango Foxtotâ?½ Nothing calls this function anywhere! */
+/* TODO-324: Whisky Tango Foxtotâ?½ Nothing calls this function anywhere!
+ *
+ * It needs to be called client-side and relay-side every time we initialize a
+ * circuit!
+ */
struct circuit_params_t;
congestion_control_t *congestion_control_new(
const struct circuit_params_t *params);
diff --git a/src/core/or/or.h b/src/core/or/or.h
index 409f4a0fea..22846872a0 100644
--- a/src/core/or/or.h
+++ b/src/core/or/or.h
@@ -794,7 +794,7 @@ typedef enum {
#define ONION_HANDSHAKE_TYPE_TAP 0x0000
#define ONION_HANDSHAKE_TYPE_FAST 0x0001
#define ONION_HANDSHAKE_TYPE_NTOR 0x0002
-#define ONION_HANDSHAKE_TYPE_NTOR_V3 0x0003 /* TODO: Add to spec */
+#define ONION_HANDSHAKE_TYPE_NTOR_V3 0x0003 /* TODO-324: Add to spec */
#define MAX_ONION_HANDSHAKE_TYPE 0x0003
typedef struct onion_handshake_state_t onion_handshake_state_t;
diff --git a/src/core/or/protover.c b/src/core/or/protover.c
index 63e9a33b72..8405a720fb 100644
--- a/src/core/or/protover.c
+++ b/src/core/or/protover.c
@@ -430,8 +430,8 @@ protover_get_supported_protocols(void)
* XXX: WARNING!
*/
- /* TODO: Add a new Relay=* and a new FlowCtrl=* version to indicate support
- * for Ntorv3 and prop324. Make sure they get into the spec. */
+ /* TODO-324: Add a new Relay=* and a new FlowCtrl=* version to indicate
+ * support for Ntorv3 and prop324. Make sure they get into the spec. */
return
"Cons=1-2 "
"Desc=1-2 "
diff --git a/src/core/or/versions.c b/src/core/or/versions.c
index 322121b43f..052351120e 100644
--- a/src/core/or/versions.c
+++ b/src/core/or/versions.c
@@ -482,7 +482,7 @@ memoize_protover_summary(protover_summary_flags_t *out,
protocol_list_supports_protocol(protocols, PRT_PADDING,
PROTOVER_HS_SETUP_PADDING);
- /* TODO: Set these flags based on real values.
+ /* TODO-324: Set these flags based on real values.
out->supports_ntor3_and_param_negotiation =
protocol_list_supports_protocol(protocols, PRT_RELAY,
XXXX)
diff --git a/src/feature/hs/hs_common.c b/src/feature/hs/hs_common.c
index ee4ec25b01..38c8bf2912 100644
--- a/src/feature/hs/hs_common.c
+++ b/src/feature/hs/hs_common.c
@@ -1688,9 +1688,16 @@ hs_get_extend_info_from_lspecs(const smartlist_t *lspecs,
info = extend_info_new(NULL, legacy_id,
(have_ed25519_id) ? &ed25519_pk : NULL, NULL,
onion_key, &ap.addr, ap.port,
- /* TODO: The protover summary here needs to explain
+ /* TODO-324: oh wow, this is a hard one.
+
+ The protover summary here needs to explain
if we support the newer congestion control or
- not. This may require new specification stuff */
+ not. This may require new specification changes.
+
+ Probably there is some analogous service-side
+ function that needs to initialize congestion
+ control structures based on what the client says.
+ */
NULL);
done:
return info;
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits