summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-06-05 10:25:50 -0400
committerNick Mathewson <nickm@torproject.org>2012-06-05 10:25:50 -0400
commit981e896dd2eaf69798bb503c271306ee779dd6d2 (patch)
tree36be8861100345fad0c563f560380ce8cf91e628
parent1ce0c5eba93d2ac48609efc327e6dc1d3a8de981 (diff)
downloadtor-981e896dd2eaf69798bb503c271306ee779dd6d2.tar.gz
tor-981e896dd2eaf69798bb503c271306ee779dd6d2.zip
Disable (Cell,DirReq,Entry,ExitPort)Statistics on bridges
These stats are currently discarded, but we might as well hard-disable them on bridges, to be clean. Fix for bug 5824; bugfix on 0.2.1.17-rc. Patch originally by Karsten Loesing.
-rw-r--r--changes/bug58243
-rw-r--r--src/or/config.c5
2 files changed, 6 insertions, 2 deletions
diff --git a/changes/bug5824 b/changes/bug5824
new file mode 100644
index 0000000000..a75e8edfc0
--- /dev/null
+++ b/changes/bug5824
@@ -0,0 +1,3 @@
+ o Minor bugfixes:
+ - Bridges now never collect statistics that were designed for
+ relays. Fix for bug 5824; bugfix on 0.2.1.17-rc.
diff --git a/src/or/config.c b/src/or/config.c
index 090d96c155..03186bf010 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -1703,8 +1703,9 @@ options_act(const or_options_t *old_options)
time_t now = time(NULL);
int print_notice = 0;
- /* If we aren't acting as a server, we can't collect stats anyway. */
- if (!server_mode(options)) {
+ /* If we aren't acting as a server, or we are a bridge, we can't collect
+ * stats anyway. */
+ if (!public_server_mode(options)) {
options->CellStatistics = 0;
options->DirReqStatistics = 0;
options->EntryStatistics = 0;