From f7a3cdc8f27c2306cf06d742af63846c82ebdc56 Mon Sep 17 00:00:00 2001 From: Sebastian Hahn Date: Wed, 9 Mar 2011 11:34:04 +0100 Subject: 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. --- src/or/rephist.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/or/rephist.h') diff --git a/src/or/rephist.h b/src/or/rephist.h index 5f6b9f9b4..b06a39ed5 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); -- cgit v1.2.3