mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-23 20:03:31 +01:00
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.
This commit is contained in:
parent
0983c203e5
commit
6190593256
7
changes/bug24910
Normal file
7
changes/bug24910
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
o Minor bugfixes (relay statistics):
|
||||||
|
- 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.
|
@ -339,7 +339,9 @@ command_process_create_cell(cell_t *cell, channel_t *chan)
|
|||||||
return;
|
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);
|
rep_hist_note_circuit_handshake_requested(create_cell->handshake_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -547,7 +547,7 @@ assign_onionskin_to_cpuworker(or_circuit_t *circ,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (connection_or_digest_is_known_relay(circ->p_chan->identity_digest))
|
if (!channel_is_client(circ->p_chan))
|
||||||
rep_hist_note_circuit_handshake_assigned(onionskin->handshake_type);
|
rep_hist_note_circuit_handshake_assigned(onionskin->handshake_type);
|
||||||
|
|
||||||
should_time = should_time_request(onionskin->handshake_type);
|
should_time = should_time_request(onionskin->handshake_type);
|
||||||
|
Loading…
Reference in New Issue
Block a user