summaryrefslogtreecommitdiff
path: root/src/or/command.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2018-04-02 01:00:31 -0400
committerRoger Dingledine <arma@torproject.org>2018-04-02 01:00:31 -0400
commit61905932565a8ff426981d77bf162f85e7f6c3ea (patch)
tree6672d529b4ca806f7be81573e010e914f5018b10 /src/or/command.c
parent0983c203e5faab7ce8e7f49ac24ce3e9da360838 (diff)
downloadtor-61905932565a8ff426981d77bf162f85e7f6c3ea.tar.gz
tor-61905932565a8ff426981d77bf162f85e7f6c3ea.zip
use channel_is_client for create cell counts
When a relay is collecting internal statistics about how many create cell requests it has seen of each type, accurately count the requests from relays that temporarily fall out of the consensus. (To be extra conservative, we were already ignoring requests from clients in our counts, and we continue ignoring them here.) Fixes bug 24910; bugfix on 0.2.4.17-rc.
Diffstat (limited to 'src/or/command.c')
-rw-r--r--src/or/command.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/command.c b/src/or/command.c
index 7280be1396..4f99462f38 100644
--- a/src/or/command.c
+++ b/src/or/command.c
@@ -339,7 +339,9 @@ command_process_create_cell(cell_t *cell, channel_t *chan)
return;
}
- if (connection_or_digest_is_known_relay(chan->identity_digest)) {
+ if (!channel_is_client(chan)) {
+ /* remember create types we've seen, but don't remember them from
+ * clients, to be extra conservative about client statistics. */
rep_hist_note_circuit_handshake_requested(create_cell->handshake_type);
}