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

[tor-commits] [tor] 11/77: trunnel: Centralize the INTRO1 extension type



This is an automated email from the git hooks/post-receive script.

dgoulet pushed a commit to branch main
in repository tor.

commit 35227a7a15dd1ff2e993c21b2a5da8d6498c0a3e
Author: David Goulet <dgoulet@xxxxxxxxxxxxxx>
AuthorDate: Wed Jun 29 12:00:41 2022 -0400

    trunnel: Centralize the INTRO1 extension type
    
    Signed-off-by: David Goulet <dgoulet@xxxxxxxxxxxxxx>
---
 src/feature/hs/hs_cell.c               | 4 ++--
 src/trunnel/hs/cell_introduce1.h       | 1 +
 src/trunnel/hs/cell_introduce1.trunnel | 2 ++
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/feature/hs/hs_cell.c b/src/feature/hs/hs_cell.c
index 004a7fcbe1..ab9283dc1b 100644
--- a/src/feature/hs/hs_cell.c
+++ b/src/feature/hs/hs_cell.c
@@ -457,7 +457,7 @@ build_introduce_cc_extension(trn_extension_t *extensions)
   /* Build CC request extension. */
   field = trn_extension_field_new();
   trn_extension_field_set_field_type(field,
-                                     TRUNNEL_EXT_TYPE_CC_FIELD_REQUEST);
+                                     TRUNNEL_EXT_TYPE_CC_REQUEST);
 
   /* No payload indicating a request to use congestion control. */
   trn_extension_field_set_field_len(field, 0);
@@ -933,7 +933,7 @@ parse_introduce_cell_extension(const hs_service_t *service,
   tor_assert(field);
 
   switch (trn_extension_field_get_field_type(field)) {
-  case TRUNNEL_EXT_TYPE_CC_FIELD_REQUEST:
+  case TRUNNEL_EXT_TYPE_CC_REQUEST:
     /* CC requests, enable it. */
     data->rdv_data.cc_enabled = 1;
     data->pv.protocols_known = 1;
diff --git a/src/trunnel/hs/cell_introduce1.h b/src/trunnel/hs/cell_introduce1.h
index 90d34f37f2..827c107b6b 100644
--- a/src/trunnel/hs/cell_introduce1.h
+++ b/src/trunnel/hs/cell_introduce1.h
@@ -19,6 +19,7 @@ struct link_specifier_st;
 #define TRUNNEL_HS_INTRO_AUTH_KEY_TYPE_LEGACY1 1
 #define TRUNNEL_HS_INTRO_AUTH_KEY_TYPE_ED25519 2
 #define TRUNNEL_HS_INTRO_ONION_KEY_TYPE_NTOR 1
+#define TRUNNEL_EXT_TYPE_CC_REQUEST 1
 #define TRUNNEL_EXT_TYPE_POW 2
 #define TRUNNEL_POW_NONCE_LEN 16
 #define TRUNNEL_POW_SOLUTION_LEN 16
diff --git a/src/trunnel/hs/cell_introduce1.trunnel b/src/trunnel/hs/cell_introduce1.trunnel
index 35e00bed94..a92fc76ab5 100644
--- a/src/trunnel/hs/cell_introduce1.trunnel
+++ b/src/trunnel/hs/cell_introduce1.trunnel
@@ -78,6 +78,8 @@ struct trn_cell_introduce_encrypted {
  * INTRODUCE1 cell (encrypted section) extensions.
  */
 
+/* Cell extenstion type Congestion Control Request. */
+const TRUNNEL_EXT_TYPE_CC_REQUEST = 0x01;
 /* Cell extension type PoW. */
 const TRUNNEL_EXT_TYPE_POW = 0x02;
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits