aboutsummaryrefslogtreecommitdiff
path: root/src/or/rephist.h
diff options
context:
space:
mode:
authorSebastian Hahn <sebastian@torproject.org>2011-03-09 11:34:04 +0100
committerSebastian Hahn <sebastian@torproject.org>2011-03-11 18:44:35 +0100
commitf7a3cdc8f27c2306cf06d742af63846c82ebdc56 (patch)
tree7b276a43f4ea8ce0baf8e111523125333fd71e6f /src/or/rephist.h
parent48c4d532814ae4fdbf07635e57911bdf0e962b75 (diff)
downloadtor-f7a3cdc8f27c2306cf06d742af63846c82ebdc56.tar.gz
tor-f7a3cdc8f27c2306cf06d742af63846c82ebdc56.zip
Use observed instead of declared uptime for HSDir
It is important to verify the uptime claim of a relay instead of just trusting it, otherwise it becomes too easy to blackhole a specific hidden service. rephist already has data available that we can use here. Bugfix on 0.2.0.10-alpha.
Diffstat (limited to 'src/or/rephist.h')
-rw-r--r--src/or/rephist.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/or/rephist.h b/src/or/rephist.h
index 5f6b9f9b45..b06a39ed59 100644
--- a/src/or/rephist.h
+++ b/src/or/rephist.h
@@ -40,6 +40,7 @@ int rep_hist_record_mtbf_data(time_t now, int missing_means_down);
int rep_hist_load_mtbf_data(time_t now);
time_t rep_hist_downrate_old_runs(time_t now);
+long rep_hist_get_uptime(const char *id, time_t when);
double rep_hist_get_stability(const char *id, time_t when);
double rep_hist_get_weighted_fractional_uptime(const char *id, time_t when);
long rep_hist_get_weighted_time_known(const char *id, time_t when);