]> git.ipfire.org Git - thirdparty/tor.git/commit
Mark descriptors as undownloadable when dirserv_add_() rejects them
authorNick Mathewson <nickm@torproject.org>
Tue, 27 Jun 2017 16:01:46 +0000 (12:01 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 27 Jun 2017 16:01:46 +0000 (12:01 -0400)
commitf367453cb5a9ea5cb0d5664425256d7abbcbb407
treea8d167e6181f57a205f8d3e91d6d8cf89bbbccd3
parent711160a46f5fbba7106c23c29f99bed75928a5a7
Mark descriptors as undownloadable when dirserv_add_() rejects them

As of ac2f6b608a18a8595f62384788196d7c3f2875fd in 0.2.1.19-alpha,
Sebastian fixed bug 888 by marking descriptors as "impossible" by
digest if they got rejected during the
router_load_routers_from_string() phase. This fix stopped clients
and relays from downloading the same thing over and over.

But we never made the same change for descriptors rejected during
dirserv_add_{descriptor,extrainfo}.  Instead, we tried to notice in
advance that we'd reject them with dirserv_would_reject().

This notice-in-advance check stopped working once we added
key-pinning and didn't make a corresponding key-pinning change to
dirserv_would_reject() [since a routerstatus_t doesn't include an
ed25519 key].

So as a fix, let's make the dirserv_add_*() functions mark digests
as undownloadable when they are rejected.

Fixes bug 22349; I am calling this a fix on 0.2.1.19-alpha, though
you could also argue for it being a fix on 0.2.7.2-alpha.
changes/bug22349 [new file with mode: 0644]
src/or/dirserv.c