summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-02-28 08:32:13 -0500
committerNick Mathewson <nickm@torproject.org>2014-02-28 08:32:13 -0500
commit043329eeb653b2f9e795cf8b7cfd8fb0b756dca5 (patch)
tree254725973497821e9de8390f9a0048d9736097b1
parentbf1678603ffa66ed47c038faf309984839a98363 (diff)
parentb7d8a1e141479add9f591e4e9fc3da15baecaecd (diff)
downloadtor-043329eeb653b2f9e795cf8b7cfd8fb0b756dca5.tar.gz
tor-043329eeb653b2f9e795cf8b7cfd8fb0b756dca5.zip
Merge remote-tracking branch 'karsten/task-5824'
-rw-r--r--changes/bug58244
-rw-r--r--changes/bug5824-24
-rw-r--r--src/or/config.c8
-rw-r--r--src/or/geoip.c5
4 files changed, 17 insertions, 4 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/changes/bug5824-2 b/changes/bug5824-2
new file mode 100644
index 0000000000..f5963ca4c8
--- /dev/null
+++ b/changes/bug5824-2
@@ -0,0 +1,4 @@
+ o Minor bugfixes:
+ - Bridges now report complete directory request statistics. Related to
+ bug 5824; bugfix on 0.2.2.1-alpha.
+
diff --git a/src/or/config.c b/src/or/config.c
index d2981771c0..5633696d0c 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -1660,10 +1660,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;
}
diff --git a/src/or/geoip.c b/src/or/geoip.c
index 6088f5d194..2e39fe0eb7 100644
--- a/src/or/geoip.c
+++ b/src/or/geoip.c
@@ -556,8 +556,9 @@ geoip_note_client_seen(geoip_client_action_t action,
(!(options->BridgeRelay && options->BridgeRecordUsageByCountry)))
return;
} else {
- if (options->BridgeRelay || options->BridgeAuthoritativeDir ||
- !options->DirReqStatistics)
+ /* Only gather directory-request statistics if configured, and
+ * forcibly disable them on bridge authorities. */
+ if (!options->DirReqStatistics || options->BridgeAuthoritativeDir)
return;
}