diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-08-05 09:59:40 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-08-05 09:59:40 -0400 |
commit | 54ad92a240d8fe0997bf833272f041ee42de5ffb (patch) | |
tree | 7f770be328fbad684725772521830e090742545e /src/core | |
parent | e57209dc32996d27fa058125d43391b2bd423826 (diff) | |
parent | 74c059596527af67f5df38847e86179852bc7005 (diff) | |
download | tor-54ad92a240d8fe0997bf833272f041ee42de5ffb.tar.gz tor-54ad92a240d8fe0997bf833272f041ee42de5ffb.zip |
Merge branch 'maint-0.4.1'
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/or/relay.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/or/relay.c b/src/core/or/relay.c index 9f90a09699..9e691a02b5 100644 --- a/src/core/or/relay.c +++ b/src/core/or/relay.c @@ -1663,6 +1663,17 @@ connection_edge_process_relay_cell(cell_t *cell, circuit_t *circ, if (circpad_handle_padding_negotiated(circ, cell, layer_hint) == 0) circuit_read_valid_data(TO_ORIGIN_CIRCUIT(circ), rh.length); return 0; + } + + /* If this is a padding circuit we don't need to parse any other commands + * than the padding ones. Just drop them to the floor. */ + if (circ->purpose == CIRCUIT_PURPOSE_C_CIRCUIT_PADDING) { + log_info(domain, "Ignored cell (%d) that arrived in padding circuit.", + rh.command); + return 0; + } + + switch (rh.command) { case RELAY_COMMAND_BEGIN: case RELAY_COMMAND_BEGIN_DIR: if (layer_hint && |