[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/main] Extend info argument updates for non-ntorv3 cases



commit 812590f8aa6637cd2b3f869dc4e30fd6550beac3
Author: Mike Perry <mikeperry-git@xxxxxxxxxxxxxx>
Date:   Thu Nov 4 19:57:57 2021 +0000

    Extend info argument updates for non-ntorv3 cases
---
 src/feature/hs/hs_common.c             | 2 +-
 src/feature/hs/hs_service.c            | 2 +-
 src/feature/relay/circuitbuild_relay.c | 3 ++-
 src/feature/relay/relay_find_addr.c    | 2 +-
 src/feature/relay/selftest.c           | 4 +++-
 src/test/test_circuitpadding.c         | 2 +-
 src/test/test_hs_client.c              | 8 ++++----
 7 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/src/feature/hs/hs_common.c b/src/feature/hs/hs_common.c
index 38c8bf2912..3036ce2710 100644
--- a/src/feature/hs/hs_common.c
+++ b/src/feature/hs/hs_common.c
@@ -1698,7 +1698,7 @@ hs_get_extend_info_from_lspecs(const smartlist_t *lspecs,
                             function that needs to initialize congestion
                             control structures based on what the client says.
                          */
-                         NULL);
+                         NULL, false);
  done:
   return info;
 }
diff --git a/src/feature/hs/hs_service.c b/src/feature/hs/hs_service.c
index 9b7b590140..2b3699422a 100644
--- a/src/feature/hs/hs_service.c
+++ b/src/feature/hs/hs_service.c
@@ -714,7 +714,7 @@ get_extend_info_from_intro_point(const hs_service_intro_point_t *ip,
 
   /* In the case of a direct connection (single onion service), it is possible
    * our firewall policy won't allow it so this can return a NULL value. */
-  info = extend_info_from_node(node, direct_conn);
+  info = extend_info_from_node(node, direct_conn, false);
 
  end:
   return info;
diff --git a/src/feature/relay/circuitbuild_relay.c b/src/feature/relay/circuitbuild_relay.c
index af3b488ae1..5b1609a1af 100644
--- a/src/feature/relay/circuitbuild_relay.c
+++ b/src/feature/relay/circuitbuild_relay.c
@@ -393,7 +393,8 @@ circuit_open_connection_for_extend(const struct extend_cell_t *ec,
                                 NULL, /*curve25519_key*/
                                 &chosen_ap->addr,
                                 chosen_ap->port,
-                                NULL /* protover summary */);
+                                NULL /* protover summary */,
+                                false);
 
   circ->n_chan_create_cell = tor_memdup(&ec->create_cell,
                                         sizeof(ec->create_cell));
diff --git a/src/feature/relay/relay_find_addr.c b/src/feature/relay/relay_find_addr.c
index 33a50ce3c3..f4f9d40823 100644
--- a/src/feature/relay/relay_find_addr.c
+++ b/src/feature/relay/relay_find_addr.c
@@ -221,7 +221,7 @@ relay_addr_learn_from_dirauth(void)
                            "learn for now our address from them.");
       return;
     }
-    extend_info_t *ei = extend_info_from_node(node, 1);
+    extend_info_t *ei = extend_info_from_node(node, 1, false);
     if (BUG(!ei)) {
       return;
     }
diff --git a/src/feature/relay/selftest.c b/src/feature/relay/selftest.c
index d52fea3c11..399b6bca6e 100644
--- a/src/feature/relay/selftest.c
+++ b/src/feature/relay/selftest.c
@@ -229,7 +229,9 @@ extend_info_from_router(const routerinfo_t *r, int family)
                          ed_id_key,
                          rsa_pubkey, r->onion_curve25519_pkey,
                          &ap.addr, ap.port,
-                         NULL /* should self-tests use ntor3? */);
+                         /* TODO-324: Should self-test circuits use
+                          * congestion control? */
+                         NULL, false);
   crypto_pk_free(rsa_pubkey);
   return info;
 }
diff --git a/src/test/test_circuitpadding.c b/src/test/test_circuitpadding.c
index 5dc5fc5201..63b7136a11 100644
--- a/src/test/test_circuitpadding.c
+++ b/src/test/test_circuitpadding.c
@@ -1609,7 +1609,7 @@ simulate_single_hop_extend(circuit_t *client, circuit_t *mid_relay,
   hop->extend_info = extend_info_new(
           padding ? "padding" : "non-padding",
           digest, NULL, NULL, NULL,
-          &addr, padding, NULL);
+          &addr, padding, NULL, false);
 
   cpath_init_circuit_crypto(hop, whatevs_key, sizeof(whatevs_key), 0, 0);
 
diff --git a/src/test/test_hs_client.c b/src/test/test_hs_client.c
index 3d84238249..0fe71ed7bd 100644
--- a/src/test/test_hs_client.c
+++ b/src/test/test_hs_client.c
@@ -1186,7 +1186,7 @@ test_socks_hs_errors(void *arg)
   /* Code path will log this exit so build it. */
   ocirc->build_state->chosen_exit = extend_info_new("TestNickname", digest,
                                                     NULL, NULL, NULL, &addr,
-                                                    4242, NULL);
+                                                    4242, NULL, false);
   /* Attach socks connection to this rendezvous circuit. */
   ocirc->p_streams = ENTRY_TO_EDGE_CONN(socks_conn);
   /* Trigger the rendezvous failure. Timeout the circuit and free. */
@@ -1281,7 +1281,7 @@ test_close_intro_circuit_failure(void *arg)
   /* Code path will log this exit so build it. */
   ocirc->build_state->chosen_exit = extend_info_new("TestNickname", digest,
                                                     NULL, NULL, NULL, &addr,
-                                                    4242, NULL);
+                                                    4242, NULL, false);
   ed25519_pubkey_copy(&ocirc->hs_ident->intro_auth_pk, &intro_kp.pubkey);
 
   /* We'll make for close the circuit for a timeout failure. It should _NOT_
@@ -1308,7 +1308,7 @@ test_close_intro_circuit_failure(void *arg)
   /* Code path will log this exit so build it. */
   ocirc->build_state->chosen_exit = extend_info_new("TestNickname", digest,
                                                     NULL, NULL, NULL, &addr,
-                                                    4242, NULL);
+                                                    4242, NULL, false);
   ed25519_pubkey_copy(&ocirc->hs_ident->intro_auth_pk, &intro_kp.pubkey);
 
   /* On free, we should get an unreachable failure. */
@@ -1331,7 +1331,7 @@ test_close_intro_circuit_failure(void *arg)
   /* Code path will log this exit so build it. */
   ocirc->build_state->chosen_exit = extend_info_new("TestNickname", digest,
                                                     NULL, NULL, NULL, &addr,
-                                                    4242, NULL);
+                                                    4242, NULL, false);
   ed25519_pubkey_copy(&ocirc->hs_ident->intro_auth_pk, &intro_kp.pubkey);
 
   circuit_mark_for_close(circ, END_CIRC_REASON_TIMEOUT);



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits