tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit a5dd41b9afa744b0fdb77bad846366b751d031c2
parent 4746e1261b403302852e3107a986e663d2b063c1
Author: David Goulet <dgoulet@torproject.org>
Date:   Tue, 26 Feb 2019 11:24:43 -0500

Merge branch 'tor-github/pr/638' into maint-0.4.0

Diffstat:
Achanges/bug29017 | 4++++
Mdoc/tor.1.txt | 2+-
Msrc/feature/relay/router.c | 11+++++------
3 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/changes/bug29017 b/changes/bug29017 @@ -0,0 +1,4 @@ + o Minor bugfixes (stats): + - When ExtraInfoStatistics is 0, stop including PaddingStatistics in + relay and bridge extra-info documents. Fixes bug 29017; + bugfix on 0.3.1.1-alpha. diff --git a/doc/tor.1.txt b/doc/tor.1.txt @@ -2340,7 +2340,7 @@ is non-zero): extra-info document. (Default: 0) [[PaddingStatistics]] **PaddingStatistics** **0**|**1**:: - Relays only. + Relays and bridges only. When this option is enabled, Tor collects statistics for padding cells sent and received by this relay, in addition to total cell counts. These statistics are rounded, and omitted if traffic is low. This diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c @@ -3028,12 +3028,11 @@ extrainfo_dump_to_string(char **s_out, extrainfo_t *extrainfo, "conn-bi-direct", now, &contents) > 0) { smartlist_add(chunks, contents); } - } - - if (options->PaddingStatistics) { - contents = rep_hist_get_padding_count_lines(); - if (contents) - smartlist_add(chunks, contents); + if (options->PaddingStatistics) { + contents = rep_hist_get_padding_count_lines(); + if (contents) + smartlist_add(chunks, contents); + } } /* Add information about the pluggable transports we support. */