]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Convert TODO into TODO-324 for better visibility.
authorNick Mathewson <nickm@torproject.org>
Tue, 14 Sep 2021 21:23:31 +0000 (17:23 -0400)
committerMike Perry <mikeperry-git@torproject.org>
Tue, 22 Feb 2022 19:28:33 +0000 (19:28 +0000)
src/core/crypto/onion_crypto.c
src/core/mainloop/cpuworker.c
src/core/or/circuitbuild.c
src/core/or/command.c
src/core/or/congestion_control_common.c
src/core/or/congestion_control_common.h
src/core/or/or.h
src/core/or/protover.c
src/core/or/versions.c
src/feature/hs/hs_common.c

index 390151b5dfe247c0360615cb2bea8605fd04f7b5..1e9913539ffc7f25e4779c4bd94a6373f3ec6366 100644 (file)
@@ -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`
     }
index 8da042aa57cddb33b246665ae5cf18eb51fa128d..7ca66a1c45cf89a7df9a16434b1e115c8a1369dd 100644 (file)
@@ -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.");
index ffb2c00493e4b7de0e8ddc7ef97bc508f08f98d4..53582d28295a24177736a88b124e3171f89dd2b1 100644 (file)
@@ -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();
 }
index fd6cebe743306ccb78acebbba20cc978fef44a64..12e4c26768144cdefad0233820176d0c63f95c0e 100644 (file)
@@ -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),
index f2becb9b20feb54e32493f956a3f8741350294f9..b76c0957e451a9bdf66a05dbe44ab689afc0dd34 100644 (file)
@@ -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);
 
index 1c44e6b0ef5dd36eefdd1e9c644e3fa3dfa11c3f..81ec79c6e6182abf4d0dd37c861835f82aa74474 100644 (file)
@@ -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);
index 409f4a0fea2c1d7c53519faf30c3b7cdb4eb99da..22846872a07a7910c1b85afb19085583b22c5738 100644 (file)
@@ -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;
index 63e9a33b724f73a7a74fe8a2a488b64171284845..8405a720fb6833961037af86d15b4e1d864a60fc 100644 (file)
@@ -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 "
index 322121b43fbb19c79a4f30e581c40d5f97d43ed5..052351120edfe8567c8eb07444ad6893ca0ef167 100644 (file)
@@ -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)
index ee4ec25b010e2f3fb218a3b29b0a46b782714d18..38c8bf2912c86572062ab93485e8a76a22d9a86d 100644 (file)
@@ -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;