mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-01 08:03:31 +01:00
Disable (Cell,Entry,ExitPort)Statistics on bridges
In 0.2.3.8-alpha we attempted to "completely disable stats if we aren't running as a relay", but instead disabled them only if we aren't running as a server. This commit leaves DirReqStatistics enabled on both relays and bridges, and disables (Cell,Entry,ExitPort)Statistics on bridges.
This commit is contained in:
parent
f12d3fe9aa
commit
90f0358e3e
4
changes/bug5824
Normal file
4
changes/bug5824
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
o Minor bugfixes:
|
||||||
|
- Bridges now never collect statistics that were designed for relays.
|
||||||
|
Fix for bug 5824; bugfix on 0.2.3.8-alpha.
|
||||||
|
|
@ -1684,10 +1684,14 @@ options_act(const or_options_t *old_options)
|
|||||||
time_t now = time(NULL);
|
time_t now = time(NULL);
|
||||||
int print_notice = 0;
|
int print_notice = 0;
|
||||||
|
|
||||||
/* If we aren't acting as a server, we can't collect stats anyway. */
|
/* Only collect directory-request statistics on relays and bridges. */
|
||||||
if (!server_mode(options)) {
|
if (!server_mode(options)) {
|
||||||
options->CellStatistics = 0;
|
|
||||||
options->DirReqStatistics = 0;
|
options->DirReqStatistics = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Only collect other relay-only statistics on relays. */
|
||||||
|
if (!public_server_mode(options)) {
|
||||||
|
options->CellStatistics = 0;
|
||||||
options->EntryStatistics = 0;
|
options->EntryStatistics = 0;
|
||||||
options->ExitPortStatistics = 0;
|
options->ExitPortStatistics = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user