瀏覽代碼

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

David Goulet 5 年之前
父節點
當前提交
a5dd41b9af
共有 3 個文件被更改,包括 10 次插入7 次删除
  1. 4 0
      changes/bug29017
  2. 1 1
      doc/tor.1.txt
  3. 5 6
      src/feature/relay/router.c

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

+ 1 - 1
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

+ 5 - 6
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. */