[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] relay: Improve the comments on onionskin_answer()
commit beee9ca608e860ee71446e4923bf4f673eb012e3
Author: teor <teor@xxxxxxxxxxxxxx>
Date: Tue Mar 17 17:41:26 2020 +1000
relay: Improve the comments on onionskin_answer()
Part of 33633.
---
src/feature/relay/circuitbuild_relay.c | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/src/feature/relay/circuitbuild_relay.c b/src/feature/relay/circuitbuild_relay.c
index 9da89953f..85a05a865 100644
--- a/src/feature/relay/circuitbuild_relay.c
+++ b/src/feature/relay/circuitbuild_relay.c
@@ -193,8 +193,24 @@ circuit_extend(struct cell_t *cell, struct circuit_t *circ)
return 0;
}
-/** Given a response payload and keys, initialize, then send a created
- * cell back.
+/** On a relay, accept a create cell, initialise a circuit, and send a
+ * created cell back.
+ *
+ * Given:
+ * - a response payload consisting of:
+ * - the <b>created_cell</b> and
+ * - an optional <b>rend_circ_nonce</b>, and
+ * - <b>keys</b> of length <b>keys_len</b>, which must be
+ * CPATH_KEY_MATERIAL_LEN;
+ * then:
+ * - initialize the circuit <b>circ</b>'s cryptographic material,
+ * - set the circuit's state to open, and
+ * - send a created cell back on that circuit.
+ *
+ * If we haven't found our ORPorts reachable yet, and the channel meets the
+ * necessary conditions, mark the relevant ORPorts as reachable.
+ *
+ * Returns -1 if cell or circuit initialisation fails.
*/
int
onionskin_answer(struct or_circuit_t *circ,
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits