diff options
author | Isis Lovecruft <isis@torproject.org> | 2018-05-07 23:59:06 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-05-22 12:13:41 -0400 |
commit | b681438daf06d8d5b1c67d8c78f1b041f9b1f5b8 (patch) | |
tree | 094e2e02c6f291acea1e28d74d8ff509705246b4 /src/or/dirserv.c | |
parent | eb966928428a80c105d33bd60bcae5503a1adeb7 (diff) | |
download | tor-b681438daf06d8d5b1c67d8c78f1b041f9b1f5b8.tar.gz tor-b681438daf06d8d5b1c67d8c78f1b041f9b1f5b8.zip |
vote: TROVE-2018-005 Make DirAuths omit misbehaving routers from their vote.
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 95bef9889d..68df1c4676 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -2943,6 +2943,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; |