aboutsummaryrefslogtreecommitdiff
path: root/src/or/geoip.c
diff options
context:
space:
mode:
authorKarsten Loesing <karsten.loesing@gmx.net>2013-12-18 18:02:10 +0100
committerKarsten Loesing <karsten.loesing@gmx.net>2013-12-18 18:02:10 +0100
commitb7d8a1e141479add9f591e4e9fc3da15baecaecd (patch)
tree70734b79a456318440fe55ed5e74016e4bab4e1d /src/or/geoip.c
parent90f0358e3e6d70f20436ebe17065b02476dd133c (diff)
downloadtor-b7d8a1e141479add9f591e4e9fc3da15baecaecd.tar
tor-b7d8a1e141479add9f591e4e9fc3da15baecaecd.tar.gz
Report complete directory request statistics on bridges.
When we wrote the directory request statistics code in August 2009, we thought that these statistics were only relevant for bridges, and that bridges should not report them. That's why we added a switch to discard relevant observations made by bridges. This code was first released in 0.2.2.1-alpha. In May 2012 we learned that we didn't fully disable directory request statistics on bridges. Bridges did report directory request statistics, but these statistics contained empty dirreq-v3-ips and dirreq-v3-reqs lines. But the remaining dirreq-* lines have always been non-empty. (We didn't notice for almost three years, because directory-request statistics were disabled by default until 0.2.3.1-alpha, and all statistics have been removed from bridge descriptors before publishing them on the metrics website.) Proposal 201, created in May 2012, suggests to add a new line called bridge-v3-reqs that is similar to dirreq-v3-reqs, but that is published only by bridges. This proposal is still open as of December 2013. Since October 2012 we're using dirreq-v3-resp (not -reqs) lines in combination with bridge-ips lines to estimate bridge user numbers; see task 8462. This estimation method has superseded the older approach that was only based on bridge-ips lines in November 2013. Using dirreq-v3-resp and bridge-ips lines is a workaround. The cleaner approach would be to use dirreq-v3-reqs instead. This commit makes bridges report the same directory request statistics as relays, including dirreq-v3-ips and dirreq-v3-reqs lines. It makes proposal 201 obsolete.
Diffstat (limited to 'src/or/geoip.c')
-rw-r--r--src/or/geoip.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/geoip.c b/src/or/geoip.c
index dc4730c81..c62fee4e9 100644
--- a/src/or/geoip.c
+++ b/src/or/geoip.c
@@ -554,8 +554,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;
}