diff options
author | Roger Dingledine <arma@torproject.org> | 2013-09-04 17:43:15 -0400 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2013-09-05 01:44:52 -0400 |
commit | 2c877d2da4a989639311de11e4ada8dd03bc8187 (patch) | |
tree | be7544f239f3da21443c967158e4ebf47303d2c4 /src/or/command.c | |
parent | f51add6dbcef073d3ba57df13eee3c99d647fde9 (diff) | |
download | tor-2c877d2da4a989639311de11e4ada8dd03bc8187.tar.gz tor-2c877d2da4a989639311de11e4ada8dd03bc8187.zip |
collect and log statistics about onionskins received/processed
we skip onionskins that came from non-relays, so we're less likely to
run into privacy troubles.
starts to implement ticket 9658.
Diffstat (limited to 'src/or/command.c')
-rw-r--r-- | src/or/command.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/or/command.c b/src/or/command.c index 876ff526a6..699b02fb47 100644 --- a/src/or/command.c +++ b/src/or/command.c @@ -29,6 +29,7 @@ #include "hibernate.h" #include "nodelist.h" #include "onion.h" +#include "rephist.h" #include "relay.h" #include "router.h" #include "routerlist.h" @@ -277,6 +278,8 @@ command_process_create_cell(cell_t *cell, channel_t *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(NULL, 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); |