[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/release-0.3.4] stats: Make PaddingStatistics depend on ExtraInfoStatistics
commit 85c598cbc2d4ca1a7c729864002b5b222980ce19
Author: teor <teor@xxxxxxxxxxxxxx>
Date: Tue Jan 8 18:21:10 2019 +1000
stats: Make PaddingStatistics depend on ExtraInfoStatistics
When ExtraInfoStatistics is 0, stop including PaddingStatistics in
relay and bridge extra-info documents.
Fixes bug 29017; bugfix on 0.3.1.1-alpha.
---
changes/bug29017 | 4 ++++
doc/tor.1.txt | 2 +-
src/or/router.c | 11 +++++------
3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/changes/bug29017 b/changes/bug29017
new file mode 100644
index 000000000..5c4a53c43
--- /dev/null
+++ 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
index c089bffbb..790ac6f6a 100644
--- a/doc/tor.1.txt
+++ b/doc/tor.1.txt
@@ -2266,7 +2266,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/or/router.c b/src/or/router.c
index edaa040dd..c308bcfae 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -3304,12 +3304,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. */
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits