Browse Source

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.
Karsten Loesing 10 years ago
parent
commit
b7d8a1e141
2 changed files with 7 additions and 2 deletions
  1. 4 0
      changes/bug5824-2
  2. 3 2
      src/or/geoip.c

+ 4 - 0
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.
+

+ 3 - 2
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;
   }