diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-02-04 11:11:54 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-02-04 11:11:54 -0500 |
commit | 4eff8b65305248b1e7a57d1efdf8f55039719bd7 (patch) | |
tree | 45ad7bbf37c0d5b1f583d1c072e0210786bfa080 /src/or/dirserv.c | |
parent | 61995d3e2cd7631df1fcb9fbdf9333dee24566b4 (diff) | |
download | tor-4eff8b65305248b1e7a57d1efdf8f55039719bd7.tar.gz tor-4eff8b65305248b1e7a57d1efdf8f55039719bd7.zip |
When we mark a node as a sybil, mark it down and reset its uptime to 0
This prevents bug 8147, where such nodes would accrue points towards
Guard, Fast, HSDir, and so on.
Fixes bug 8147.
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 0c3e72f3a3..b59478e17d 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -2776,6 +2776,11 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key, routers_sort_by_identity(routers); omit_as_sybil = get_possible_sybil_list(routers); + DIGESTMAP_FOREACH(omit_as_sybil, sybil_id, void *, ignore) { + (void) ignore; + rep_hist_make_router_pessimal(sybil_id, now); + } DIGESTMAP_FOREACH_END; + dirserv_compute_performance_thresholds(rl, omit_as_sybil); routerstatuses = smartlist_new(); |