aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-12-11 16:54:14 -0500
committerNick Mathewson <nickm@torproject.org>2017-12-11 16:54:14 -0500
commiteaaa1108a3eb1271ad2c8f3fbb8a6845d24de874 (patch)
tree2082a197683d25a240200b976e4e725572e96798
parent7e486dd6f7f845c14471b406d6bc7dfa4f593b12 (diff)
parentbc1ea4f470734f7fa22949318a98e286da5cba49 (diff)
downloadtor-eaaa1108a3eb1271ad2c8f3fbb8a6845d24de874.tar.gz
tor-eaaa1108a3eb1271ad2c8f3fbb8a6845d24de874.zip
Merge branch 'maint-0.2.8' into maint-0.2.9
-rw-r--r--changes/ticket238564
-rw-r--r--src/or/rephist.c4
-rw-r--r--src/or/router.c2
3 files changed, 7 insertions, 3 deletions
diff --git a/changes/ticket23856 b/changes/ticket23856
new file mode 100644
index 0000000000..049da18d06
--- /dev/null
+++ b/changes/ticket23856
@@ -0,0 +1,4 @@
+ o Minor feature (relay statistics):
+ - Change relay bandwidth reporting stats interval from 4 hours to 24 hours
+ in order to reduce the efficiency of guard discovery attacks. Fixes
+ ticket 23856.
diff --git a/src/or/rephist.c b/src/or/rephist.c
index 8bcd7396aa..f0bac57898 100644
--- a/src/or/rephist.c
+++ b/src/or/rephist.c
@@ -1197,9 +1197,9 @@ rep_hist_load_mtbf_data(time_t now)
* totals? */
#define NUM_SECS_ROLLING_MEASURE 10
/** How large are the intervals for which we track and report bandwidth use? */
-#define NUM_SECS_BW_SUM_INTERVAL (4*60*60)
+#define NUM_SECS_BW_SUM_INTERVAL (24*60*60)
/** How far in the past do we remember and publish bandwidth use? */
-#define NUM_SECS_BW_SUM_IS_VALID (24*60*60)
+#define NUM_SECS_BW_SUM_IS_VALID (5*24*60*60)
/** How many bandwidth usage intervals do we remember? (derived) */
#define NUM_TOTALS (NUM_SECS_BW_SUM_IS_VALID/NUM_SECS_BW_SUM_INTERVAL)
diff --git a/src/or/router.c b/src/or/router.c
index aca8040a69..31f2ff00d2 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -2423,7 +2423,7 @@ mark_my_descriptor_dirty(const char *reason)
/** How frequently will we republish our descriptor because of large (factor
* of 2) shifts in estimated bandwidth? Note: We don't use this constant
* if our previous bandwidth estimate was exactly 0. */
-#define MAX_BANDWIDTH_CHANGE_FREQ (20*60)
+#define MAX_BANDWIDTH_CHANGE_FREQ (3*60*60)
/** Check whether bandwidth has changed a lot since the last time we announced
* bandwidth. If so, mark our descriptor dirty. */