diff options
author | Nick Mathewson <nickm@torproject.org> | 2024-06-24 13:54:26 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2024-06-24 13:54:26 -0400 |
commit | f631145cbf2d0a8f1f170e206c38c77edfba8bad (patch) | |
tree | ab23168a1a24425e672e7f7b8a06e3194290e0f4 /src | |
parent | f6f2d5c4a021d600d810086a795bf5b9f28e6a10 (diff) | |
download | tor-f631145cbf2d0a8f1f170e206c38c77edfba8bad.tar.gz tor-f631145cbf2d0a8f1f170e206c38c77edfba8bad.zip |
Remove support for deciding to use CREATE/EXTEND/TAP.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/or/circuitbuild.c | 34 |
1 files changed, 10 insertions, 24 deletions
diff --git a/src/core/or/circuitbuild.c b/src/core/or/circuitbuild.c index d4dcdec417..bbfb247b1a 100644 --- a/src/core/or/circuitbuild.c +++ b/src/core/or/circuitbuild.c @@ -889,20 +889,14 @@ circuit_pick_create_handshake(uint8_t *cell_type_out, { /* torspec says: In general, clients SHOULD use CREATE whenever they are * using the TAP handshake, and CREATE2 otherwise. */ - if (extend_info_supports_ntor(ei)) { - *cell_type_out = CELL_CREATE2; - /* Only use ntor v3 with exits that support congestion control, - * and only when it is enabled. */ - if (ei->exit_supports_congestion_control && - congestion_control_enabled()) - *handshake_type_out = ONION_HANDSHAKE_TYPE_NTOR_V3; - else - *handshake_type_out = ONION_HANDSHAKE_TYPE_NTOR; - } else { - /* XXXX030 Remove support for deciding to use TAP and EXTEND. */ - *cell_type_out = CELL_CREATE; - *handshake_type_out = ONION_HANDSHAKE_TYPE_TAP; - } + *cell_type_out = CELL_CREATE2; + /* Only use ntor v3 with exits that support congestion control, + * and only when it is enabled. */ + if (ei->exit_supports_congestion_control && + congestion_control_enabled()) + *handshake_type_out = ONION_HANDSHAKE_TYPE_NTOR_V3; + else + *handshake_type_out = ONION_HANDSHAKE_TYPE_NTOR; } /** Decide whether to use a TAP or ntor handshake for extending to <b>ei</b> @@ -923,16 +917,8 @@ circuit_pick_extend_handshake(uint8_t *cell_type_out, uint8_t t; circuit_pick_create_handshake(&t, handshake_type_out, ei); - /* torspec says: Clients SHOULD use the EXTEND format whenever sending a TAP - * handshake... In other cases, clients SHOULD use EXTEND2. */ - if (*handshake_type_out != ONION_HANDSHAKE_TYPE_TAP) { - *cell_type_out = RELAY_COMMAND_EXTEND2; - *create_cell_type_out = CELL_CREATE2; - } else { - /* XXXX030 Remove support for deciding to use TAP and EXTEND. */ - *cell_type_out = RELAY_COMMAND_EXTEND; - *create_cell_type_out = CELL_CREATE; - } + *cell_type_out = RELAY_COMMAND_EXTEND2; + *create_cell_type_out = CELL_CREATE2; } /** |