mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
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.
This commit is contained in:
@@ -19,9 +19,11 @@
|
||||
#include "circuitlist.h"
|
||||
#include "config.h"
|
||||
#include "connection.h"
|
||||
#include "connection_or.h"
|
||||
#include "cpuworker.h"
|
||||
#include "main.h"
|
||||
#include "onion.h"
|
||||
#include "rephist.h"
|
||||
#include "router.h"
|
||||
|
||||
/** The maximum number of cpuworker processes we will keep around. */
|
||||
@@ -683,6 +685,9 @@ assign_onionskin_to_cpuworker(connection_t *cpuworker,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (connection_or_digest_is_known_relay(circ->p_chan->identity_digest))
|
||||
rep_hist_note_circuit_handshake_completed(onionskin->handshake_type);
|
||||
|
||||
should_time = should_time_request(onionskin->handshake_type);
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.magic = CPUWORKER_REQUEST_MAGIC;
|
||||
|
||||
Reference in New Issue
Block a user