summaryrefslogtreecommitdiff
path: root/src/or/dirauth
diff options
context:
space:
mode:
authorIsis Lovecruft <isis@torproject.org>2018-05-07 23:59:06 +0000
committerNick Mathewson <nickm@torproject.org>2018-05-22 12:28:33 -0400
commit3283619acfcd9ad93edc891600991cff9ed3bed9 (patch)
tree3b45a7b8a31750c0d0daa3a39ad9cf8464b728c2 /src/or/dirauth
parent701c2b69f52cb4db46aa7455904e518b35fafc1a (diff)
downloadtor-3283619acfcd9ad93edc891600991cff9ed3bed9.tar.gz
tor-3283619acfcd9ad93edc891600991cff9ed3bed9.zip
vote: TROVE-2018-005 Make DirAuths omit misbehaving routers from their vote.
Diffstat (limited to 'src/or/dirauth')
-rw-r--r--src/or/dirauth/dirvote.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/dirauth/dirvote.c b/src/or/dirauth/dirvote.c
index cbc3ff7829..b097b10cf9 100644
--- a/src/or/dirauth/dirvote.c
+++ b/src/or/dirauth/dirvote.c
@@ -4358,6 +4358,12 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key,
microdescriptors = smartlist_new();
SMARTLIST_FOREACH_BEGIN(routers, routerinfo_t *, ri) {
+ /* If it has a protover list and contains a protocol name greater than
+ * MAX_PROTOCOL_NAME_LENGTH, skip it. */
+ if (ri->protocol_list &&
+ protover_contains_long_protocol_names(ri->protocol_list)) {
+ continue;
+ }
if (ri->cache_info.published_on >= cutoff) {
routerstatus_t *rs;
vote_routerstatus_t *vrs;