aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/relay.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2019-01-09 15:08:14 -0500
committerDavid Goulet <dgoulet@torproject.org>2019-04-29 12:17:57 -0400
commit93f9fbbd34f03aca68c8c64a7e39b64548462eeb (patch)
tree0dbc64e43dcb4b1773fc09a88a546c045f335918 /src/core/or/relay.c
parent81706d84279f0a2870f8b1789403188fd933b32a (diff)
downloadtor-93f9fbbd34f03aca68c8c64a7e39b64548462eeb.tar.gz
tor-93f9fbbd34f03aca68c8c64a7e39b64548462eeb.zip
prop289: Keep track of the last seen cell digests
This makes tor remember the last seen digest of a cell if that cell is the last one before a SENDME on the Exit side. Closes #26839 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/core/or/relay.c')
-rw-r--r--src/core/or/relay.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/or/relay.c b/src/core/or/relay.c
index 76f2203a9a..b26360b245 100644
--- a/src/core/or/relay.c
+++ b/src/core/or/relay.c
@@ -639,6 +639,14 @@ relay_send_command_from_edge_,(streamid_t stream_id, circuit_t *circ,
circuit_mark_for_close(circ, END_CIRC_REASON_INTERNAL);
return -1;
}
+
+ /* If applicable, note the cell digest for the SENDME version 1 purpose if
+ * we need to. This call needs to be after the circuit_package_relay_cell()
+ * because the cell digest is set within that function. */
+ if (relay_command == RELAY_COMMAND_DATA) {
+ sendme_note_cell_digest(circ);
+ }
+
return 0;
}