mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Convert TODO into TODO-324 for better visibility.
This commit is contained in:
committed by
Mike Perry
parent
662b9c1c0d
commit
93318ba5e2
@@ -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`
|
||||
}
|
||||
|
||||
@@ -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.");
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
@@ -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 "
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user