aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changes/bug58244
-rw-r--r--src/or/config.c8
2 files changed, 10 insertions, 2 deletions
diff --git a/changes/bug5824 b/changes/bug5824
new file mode 100644
index 0000000000..15d366fe52
--- /dev/null
+++ b/changes/bug5824
@@ -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.
+
diff --git a/src/or/config.c b/src/or/config.c
index d348f1036b..379685802c 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -1684,10 +1684,14 @@ options_act(const or_options_t *old_options)
time_t now = time(NULL);
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)) {
- options->CellStatistics = 0;
options->DirReqStatistics = 0;
+ }
+
+ /* Only collect other relay-only statistics on relays. */
+ if (!public_server_mode(options)) {
+ options->CellStatistics = 0;
options->EntryStatistics = 0;
options->ExitPortStatistics = 0;
}