aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/relay.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2019-01-09 14:03:32 -0500
committerDavid Goulet <dgoulet@torproject.org>2019-04-29 12:17:57 -0400
commit81706d84279f0a2870f8b1789403188fd933b32a (patch)
tree4873b8c0b0833815968800bd306c23819e1db4eb /src/core/or/relay.c
parent023a70da841182fbbbe11389929c8fbbc7490365 (diff)
downloadtor-81706d84279f0a2870f8b1789403188fd933b32a.tar.gz
tor-81706d84279f0a2870f8b1789403188fd933b32a.zip
prop289: Support SENDME v1 cell parsing
This commit makes tor able to parse and handle a SENDME version 1. It will look at the consensus parameter "sendme_accept_min_version" to know what is the minimum version it should look at. IMPORTANT: At this commit, the validation of the cell is not fully implemented. For this, we need #26839 to be completed that is to match the SENDME digest with the last cell digest. Closes #26841 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/core/or/relay.c')
-rw-r--r--src/core/or/relay.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/or/relay.c b/src/core/or/relay.c
index 6f69ed999b..76f2203a9a 100644
--- a/src/core/or/relay.c
+++ b/src/core/or/relay.c
@@ -1814,7 +1814,9 @@ connection_edge_process_relay_cell(cell_t *cell, circuit_t *circ,
if (!rh.stream_id) {
/* Circuit level SENDME cell. */
- ret = sendme_process_circuit_level(layer_hint, circ, rh.length);
+ ret = sendme_process_circuit_level(layer_hint, circ,
+ cell->payload + RELAY_HEADER_SIZE,
+ rh.length);
if (ret < 0) {
return ret;
}