diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-05-08 13:54:59 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-05-08 13:54:59 -0400 |
commit | 4d30dde15670bd4fb572025116304286880db636 (patch) | |
tree | 7a368ad50ff8949ff106f03012888f0b9f2a5521 /src/or/command.c | |
parent | 35025ee51ff9204271fcfc787a99334082e531a1 (diff) | |
parent | 9f8e462c89a8320f161f5a77661d573d889651cf (diff) | |
download | tor-4d30dde15670bd4fb572025116304286880db636.tar.gz tor-4d30dde15670bd4fb572025116304286880db636.zip |
Merge branch 'netflow_padding-v6-rebased2-squashed'
Diffstat (limited to 'src/or/command.c')
-rw-r--r-- | src/or/command.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/or/command.c b/src/or/command.c index c91a967fd4..c667cbbe52 100644 --- a/src/or/command.c +++ b/src/or/command.c @@ -326,10 +326,19 @@ command_process_create_cell(cell_t *cell, channel_t *chan) return; } + if (connection_or_digest_is_known_relay(chan->identity_digest)) { + rep_hist_note_circuit_handshake_requested(create_cell->handshake_type); + // Needed for chutney: Sometimes relays aren't in the consensus yet, and + // get marked as clients. This resets their channels once they appear. + // Probably useful for normal operation wrt relay flapping, too. + chan->is_client = 0; + } else { + channel_mark_client(chan); + } + if (create_cell->handshake_type != ONION_HANDSHAKE_TYPE_FAST) { /* hand it off to the cpuworkers, and then return. */ - if (connection_or_digest_is_known_relay(chan->identity_digest)) - rep_hist_note_circuit_handshake_requested(create_cell->handshake_type); + if (assign_onionskin_to_cpuworker(circ, create_cell) < 0) { log_debug(LD_GENERAL,"Failed to hand off onionskin. Closing."); circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_RESOURCELIMIT); |