summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2021-01-28 12:02:43 -0500
committerDavid Goulet <dgoulet@torproject.org>2021-01-28 12:02:43 -0500
commit1f39a13d1459e64bf861174f0f5d49d04f7c06fa (patch)
tree3ad4e784d222173e96a7ee674de78540cdaf797f
parent869fa2a2ef5978a6fc328f4d30376ecd1b06e2d2 (diff)
parent8f13257ccd99772473949200e72e90ba2dd419a1 (diff)
downloadtor-1f39a13d1459e64bf861174f0f5d49d04f7c06fa.tar.gz
tor-1f39a13d1459e64bf861174f0f5d49d04f7c06fa.zip
Merge branch 'maint-0.3.5' into release-0.3.5
-rw-r--r--changes/bug401175
-rw-r--r--src/feature/rend/rendmid.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/changes/bug40117 b/changes/bug40117
new file mode 100644
index 0000000000..77646edf9c
--- /dev/null
+++ b/changes/bug40117
@@ -0,0 +1,5 @@
+ o Major bugfixes (stats, onion services):
+ - Fix a bug where we were undercounting the Tor network's total onion
+ service traffic, by only counting rendezvous traffic originating from
+ services and ignoring any traffic originating from clients. Fixes bug
+ 40117; bugfix on 0.2.6.2-alpha.
diff --git a/src/feature/rend/rendmid.c b/src/feature/rend/rendmid.c
index 3ba48f8858..af02b34e6b 100644
--- a/src/feature/rend/rendmid.c
+++ b/src/feature/rend/rendmid.c
@@ -333,10 +333,12 @@ rend_mid_rendezvous(or_circuit_t *circ, const uint8_t *request,
goto err;
}
- /* Statistics: Mark this circuit as an RP circuit so that we collect
- stats from it. */
+ /* Statistics: Mark circuits as RP circuits */
if (options->HiddenServiceStatistics) {
+ /* `circ` is the RP <-> service circuit */
circ->circuit_carries_hs_traffic_stats = 1;
+ /* `rend_circ` is the client <-> RP circuit */
+ rend_circ->circuit_carries_hs_traffic_stats = 1;
}
/* Send the RENDEZVOUS2 cell to the client. */