diff options
author | David Goulet <dgoulet@torproject.org> | 2022-06-29 11:56:05 -0400 |
---|---|---|
committer | Micah Elizabeth Scott <beth@torproject.org> | 2023-05-10 07:37:11 -0700 |
commit | 4eb783e97b20c830a1a4dff91cef13bcfd4f713f (patch) | |
tree | c65643762e8150db623a1bd11c5ca2ed77238cd5 /src/trunnel | |
parent | f0b63ca242a66cb5172e6b11a9f068ed348f601b (diff) | |
download | tor-4eb783e97b20c830a1a4dff91cef13bcfd4f713f.tar.gz tor-4eb783e97b20c830a1a4dff91cef13bcfd4f713f.zip |
hs: Priority queue for rendezvous requests
If PoW are enabled, use a priority queue by effort for the rendezvous
requests hooked into the mainloop.
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/trunnel')
-rw-r--r-- | src/trunnel/hs/cell_introduce1.h | 4 | ||||
-rw-r--r-- | src/trunnel/hs/cell_introduce1.trunnel | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/trunnel/hs/cell_introduce1.h b/src/trunnel/hs/cell_introduce1.h index 89339e1a0d..90d34f37f2 100644 --- a/src/trunnel/hs/cell_introduce1.h +++ b/src/trunnel/hs/cell_introduce1.h @@ -19,10 +19,10 @@ 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_CELL_EXTENSION_TYPE_POW 1 +#define TRUNNEL_EXT_TYPE_POW 2 #define TRUNNEL_POW_NONCE_LEN 16 #define TRUNNEL_POW_SOLUTION_LEN 16 -#define TRUNNEL_POW_EQUIX 1 +#define TRUNNEL_POW_VERSION_EQUIX 1 #if !defined(TRUNNEL_OPAQUE) && !defined(TRUNNEL_OPAQUE_TRN_CELL_EXTENSION_POW) struct trn_cell_extension_pow_st { uint8_t pow_version; diff --git a/src/trunnel/hs/cell_introduce1.trunnel b/src/trunnel/hs/cell_introduce1.trunnel index 18865ddc02..35e00bed94 100644 --- a/src/trunnel/hs/cell_introduce1.trunnel +++ b/src/trunnel/hs/cell_introduce1.trunnel @@ -79,7 +79,7 @@ struct trn_cell_introduce_encrypted { */ /* Cell extension type PoW. */ -const TRUNNEL_CELL_EXTENSION_TYPE_POW = 0x01; +const TRUNNEL_EXT_TYPE_POW = 0x02; /* * HRPR: PoW Solution Extension. Proposal 327. @@ -88,7 +88,7 @@ const TRUNNEL_CELL_EXTENSION_TYPE_POW = 0x01; const TRUNNEL_POW_NONCE_LEN = 16; const TRUNNEL_POW_SOLUTION_LEN = 16; /* Version 1 is based on Equi-X scheme. */ -const TRUNNEL_POW_EQUIX = 0x01; +const TRUNNEL_POW_VERSION_EQUIX = 0x01; struct trn_cell_extension_pow { /* Type of PoW system used. */ |