summaryrefslogtreecommitdiff
path: root/src/or/dirserv.c
AgeCommit message (Collapse)Author
2017-07-12Merge branch 'maint-0.3.1'Nick Mathewson
2017-07-12Merge branch 'bug22349_029' into maint-0.3.1Nick Mathewson
2017-06-27Merge branch 'maint-0.3.1'Nick Mathewson
2017-06-27Set published_out for consensus cache entries in ↵Alexander Færøy
spooled_resource_estimate_size(). This patch ensures that the published_out output parameter is set to the current consensus cache entry's "valid after" field. See: https://bugs.torproject.org/22702
2017-06-27Merge branch 'asn_bug22006_final_squashed'Nick Mathewson
2017-06-27ed25519: Dirauths validate router ed25519 pubkeys before pinning.George Kadianakis
2017-06-27Mark descriptors as undownloadable when dirserv_add_() rejects themNick Mathewson
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.
2017-05-25Merge branch 'maint-0.3.0'Roger Dingledine
2017-05-25Merge branch 'maint-0.2.9' into maint-0.3.0Roger Dingledine
2017-05-25Stop leaking keypin-rejected routerinfos on directory authoritiesteor
When directory authorities reject a router descriptor due to keypinning, free the router descriptor rather than leaking the memory. Fixes bug 22370; bugfix on 0.2.7.2-alpha.
2017-05-22Merge branch 'maint-0.3.0'Nick Mathewson
2017-05-22Merge branch 'maint-0.2.9' into maint-0.3.0Nick Mathewson
2017-05-22dir auths reject 0.2.9.x for x<5, due to bug 20499Roger Dingledine
Directory authorities now reject relays running versions 0.2.9.1-alpha through 0.2.9.4-alpha, because those relays suffer from bug 20499 and don't keep their consensus cache up-to-date. Resolves ticket 20509.
2017-05-15Merge branch 'ahf_bugs_21667_2_squashed'Nick Mathewson
2017-05-15Merge remote-tracking branch 'public/bug20270_029'Nick Mathewson
2017-05-12Use dir_compressed(_len) instead of dir_z(_len).Alexander Færøy
This patch renames `dir_z` to `dir_compressed` and `dir_z_len` to `dir_compressed_len`. See: https://bugs.torproject.org/21667
2017-05-10add an XXX with a minor bug in dirserv_add_multiple_descriptorsRoger Dingledine
2017-05-09Report common reasons for rejecting a relay before uncommon onesNick Mathewson
"You're running 0.2.2; upgrade!" is more sensible than "You have no ntor key!" Closes ticket 20270; bugfix on 0.2.9.3-alpha.
2017-05-04Update the consdiff directory code based on #22143 fixesNick Mathewson
These are mostly just identifier renames, except for one place in routerparse.c where we switch to using a correct hash.
2017-05-04Store the sha3 of a networkstatus as part of the networkstatus_tNick Mathewson
Also store it in the cached_dir_t.
2017-05-04Add consensus_cache_entry spooling support to spooled_resource_tNick Mathewson
2017-04-18Rename `write_to_buf_zlib()` to `write_to_buf_compress()`.Alexander Færøy
See https://bugs.torproject.org/21663
2017-04-18Rename `zlib_state` to `compress_state` in `dir_connection_t`.Alexander Færøy
This patch renames the `zlib_state` field in `dir_connection_t` to `compress_state`. See https://bugs.torproject.org/21663
2017-04-17Refactor the streaming compression code.Alexander Færøy
This patch refactors our streaming compression code to allow us to extend it with non-zlib/non-gzip based compression schemas. See https://bugs.torproject.org/21663
2017-04-17Rename `tor_gzip_{compress,uncompress}` to `tor_{compress,uncompress}`.Alexander Færøy
To allow us to use the API name `tor_compress` and `tor_uncompress` as the main entry-point for all compression/uncompression and not just gzip and zlib. See https://bugs.torproject.org/21663
2017-03-29Fix another 32-bit warning in the spooling codeNick Mathewson
2017-03-28Fix i386 compilation from spooling patch. I seem to be good at breaking that.Nick Mathewson
2017-03-28Merge branch 'spooling_squashed'Nick Mathewson
2017-03-28Improve documentation for connection_dirserv_flushed_some.Nick Mathewson
2017-03-28Refactor the directory spool implementationNick Mathewson
The old implementation had duplicated code in a bunch of places, and it interspersed spool-management with resource management. The new implementation should make it easier to add new resource types and maintain the spooling code. Closing ticket 21651.
2017-03-15Run the copyright update script.Nick Mathewson
2017-03-13Remove DIR_SPOOL_CACHED_DIR: Nothing uses it.Nick Mathewson
2017-03-10Mark GETINFO network-status as deprecated with a warningNick Mathewson
control-spec has marked it deprecated for a long time. Closes ticket 21703.
2017-03-09Remove fgets() compatbility function and related tests.Alexander Færøy
This patch removes the `tor_fgets()` wrapper around `fgets(3)` since it is no longer needed. The function was created due to inconsistency between the returned values of `fgets(3)` on different versions of Unix when using `fgets(3)` on non-blocking file descriptors, but with the recent changes in bug #21654 we switch from unbuffered to direct I/O on non-blocking file descriptors in our utility module. We continue to use `fgets(3)` directly in the geoip and dirserv module since this usage is considered safe. This patch also removes the test-case that was created to detect differences in the implementation of `fgets(3)` as well as the changes file since these changes was not included in any releases yet. See: https://bugs.torproject.org/21654
2017-03-01Use tor_fgets() instead of fgets().Alexander Færøy
This patch changes our use of fgets() to tor_fgets() for more consistent error handling across different versions of the C library.
2017-02-27Merge branch 'bug21369_check_029_squashed' into maint-0.3.0Nick Mathewson
2017-02-27Add one other BUG check to try to fix/solve 21369.Nick Mathewson
Teor thinks that this connection_dirserv_add_dir_bytes_to_outbuf() might be the problem, if the "remaining" calculation underflows. So I'm adding a couple of checks there, and improving the casts.
2017-02-15Merge branch 'maint-0.2.9'Nick Mathewson
2017-02-15When examining descriptors as a dirserver, reject ones with bad versionsNick Mathewson
This is an extra fix for bug 21278: it ensures that these descriptors and platforms will never be listed in a legit consensus.
2017-02-02dirauth: Fix for calling routers unreachable for wrong ed25519Nick Mathewson
Previously the dirserv_orconn_tls_done() function would skip routers when they advertised an ed25519 key but didn't present it during the link handshake. But that covers all versions between 0.2.7.2-alpha and 0.2.9.x inclusive! Fixes bug 21107; bugfix on 0.3.0.1-alpha.
2017-02-02In dirserv_single_reachability_test, node can be const.Nick Mathewson
2017-01-31Merge branch 'bug21108_029'Nick Mathewson
2017-01-31be explicit in clear_status_flags_on_sybil that we leave BadExit aloneRoger Dingledine
2017-01-31Do not clear is_bad_exit on sybil.Nick Mathewson
But do clear is_v2_dir. Fixes bug 21108 -- bugfix on d95e7c7d67134b9b964d49cf8c2bdbf805a in 0.2.0.13-alpha.
2016-12-18fix typos and trivial syntax problemsRoger Dingledine
2016-12-13Remove AuthDirMaxServersPerAuthAddrNick Mathewson
Back when Roger had do do most of our testing on the moria host, we needed a higher limit for the number of relays running on a single IP address when that limit was shared with an authority. Nowadays, the idea is pretty obsolete. Also remove the router_addr_is_trusted_dir() function, which served no other purpose. Closes ticket 20960.
2016-12-12Replace "people" with the appropriate network component in commentsJ. Ryan Stinnett
Fixes #18145.
2016-12-08Merge branch 'feature15056_v1_squashed'Nick Mathewson
2016-12-08Add an option to disable dirauth ed25519 link key checks.Nick Mathewson
If there is some horrible bug in our ed25519 link authentication code that causes us to label every single ed25519-having node as non-running, we'll be glad we had this. Otherwise we can remove it later.
2016-12-08Enforce Ed25519 identities (client-side)Nick Mathewson
This patch makes two absolutely critical changes: - If an ed25519 identity is not as expected when creating a channel, we call that channel unsuccessful and close it. - When a client creating a channel or an extend cell for a circuit, we only include the ed25519 identity if we believe that the node on the other side supports ed25519 link authentication (from #15055). Otherwise we will insist on nodes without the right link protocol authenticating themselves. - When deciding to extend to another relay, we only upgrade the extend to extend by ed25519 ID when we know the ed25519 ID _and_ we know that the other side can authenticate. This patch also tells directory servers, when probing nodes, to try to check their ed25519 identities too (if they can authenticate by ed25519 identity). Also, handle the case where we connect by RSA Id, and learn the ED25519 ID for the node in doing so.