Skip to content
Snippets Groups Projects
Commit f631145c authored by Nick Mathewson's avatar Nick Mathewson :family:
Browse files

Remove support for deciding to use CREATE/EXTEND/TAP.

parent f6f2d5c4
No related branches found
No related tags found
No related merge requests found
...@@ -889,20 +889,14 @@ circuit_pick_create_handshake(uint8_t *cell_type_out, ...@@ -889,20 +889,14 @@ circuit_pick_create_handshake(uint8_t *cell_type_out,
{ {
/* torspec says: In general, clients SHOULD use CREATE whenever they are /* torspec says: In general, clients SHOULD use CREATE whenever they are
* using the TAP handshake, and CREATE2 otherwise. */ * using the TAP handshake, and CREATE2 otherwise. */
if (extend_info_supports_ntor(ei)) { *cell_type_out = CELL_CREATE2;
*cell_type_out = CELL_CREATE2; /* Only use ntor v3 with exits that support congestion control,
/* Only use ntor v3 with exits that support congestion control, * and only when it is enabled. */
* and only when it is enabled. */ if (ei->exit_supports_congestion_control &&
if (ei->exit_supports_congestion_control && congestion_control_enabled())
congestion_control_enabled()) *handshake_type_out = ONION_HANDSHAKE_TYPE_NTOR_V3;
*handshake_type_out = ONION_HANDSHAKE_TYPE_NTOR_V3; else
else *handshake_type_out = ONION_HANDSHAKE_TYPE_NTOR;
*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;
}
} }
/** Decide whether to use a TAP or ntor handshake for extending to <b>ei</b> /** 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, ...@@ -923,16 +917,8 @@ circuit_pick_extend_handshake(uint8_t *cell_type_out,
uint8_t t; uint8_t t;
circuit_pick_create_handshake(&t, handshake_type_out, ei); circuit_pick_create_handshake(&t, handshake_type_out, ei);
/* torspec says: Clients SHOULD use the EXTEND format whenever sending a TAP *cell_type_out = RELAY_COMMAND_EXTEND2;
* handshake... In other cases, clients SHOULD use EXTEND2. */ *create_cell_type_out = CELL_CREATE2;
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;
}
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment