summaryrefslogtreecommitdiff
path: root/src/or/dirserv.c
AgeCommit message (Collapse)Author
2017-12-04Merge branch 'bug23826-23828_squashed'Nick Mathewson
2017-12-02Make set_routerstatus_from_routerinfo() set IPv6 unspecified addressesteor
When creating a routerstatus (vote) from a routerinfo (descriptor), set the IPv6 address to the unspecified IPv6 address, and explicitly initialise the port to zero. Also clarify the documentation for the function. Fixes bug 24488; bugfix on 0.2.4.1-alpha.
2017-11-13Merge remote-tracking branch 'sebastian/bug24137'Nick Mathewson
2017-11-09Merge branch 'ticket20895'Nick Mathewson
2017-11-04fixup! Allow bootstrapping networks to have Exit flagsSebastian Hahn
2017-11-03Allow bootstrapping networks to have Exit flagsSebastian Hahn
Relevant for non-test networks
2017-10-15Add a consensus method for IPv6 address lines in the microdesc consensusteor
Implements #23826.
2017-10-15Add a consensus_method argument to routerstatus_format_entry()teor
And pass ROUTERSTATUS_FORMAT_NO_CONSENSUS_METHOD when it's not applicable. Preparation for #23826.
2017-09-15Run our #else/#endif annotator on our source code.Nick Mathewson
2017-09-11Split the behavior of node_supports_ed25519_link_authentication().Nick Mathewson
Before, this function meant "can we connect to this node and authenticate it using its ed25519 key?" Now it can additionally mean, "when somebody else connects to this node, do we expect that they can authenticate using the node's ed25519 key"? This change lets us future-proof our link authentication a bit. Closes ticket 20895. No backport needed, since ed25519 link authentication support has not been in any LTS release yet, and existing releases with it should be obsolete before any releases without support for linkauth=3 are released.
2017-09-08Merge branch 'ticket22377'Nick Mathewson
2017-09-05Repair buffer API so everything starts with buf_.Nick Mathewson
Our convention is that functions which manipulate a type T should be named T_foo. But the buffer functions were super old, and followed all kinds of conventions. Now they're uniform. Here's the perl I used to do this: \#!/usr/bin/perl -w -i -p s/read_to_buf\(/buf_read_from_socket\(/; s/flush_buf\(/buf_flush_to_socket\(/; s/read_to_buf_tls\(/buf_read_from_tls\(/; s/flush_buf_tls\(/buf_flush_to_tls\(/; s/write_to_buf\(/buf_add\(/; s/write_to_buf_compress\(/buf_add_compress\(/; s/move_buf_to_buf\(/buf_move_to_buf\(/; s/peek_from_buf\(/buf_peek\(/; s/fetch_from_buf\(/buf_get_bytes\(/; s/fetch_from_buf_line\(/buf_get_line\(/; s/fetch_from_buf_line\(/buf_get_line\(/; s/buf_remove_from_front\(/buf_drain\(/; s/peek_buf_startswith\(/buf_peek_startswith\(/; s/assert_buf_ok\(/buf_assert_ok\(/;
2017-08-28Merge branch 'ticket22348_031'Nick Mathewson
2017-08-28Try to improve the keypinning-failure message even moreNick Mathewson
2017-08-28Don't use "0" as a "base" argument to tor_parse_*().Nick Mathewson
Telling these functions to autodetect the numeric base has lead to trouble in the past. Fixes bug 22469. Bugfix on 0.2.2.various.
2017-08-24Remove the AUTHDIR_NEWDESCS feature: nobody is using it any moreNick Mathewson
If somebody asks for it, log a warning. Closes ticket 22377.
2017-07-31Improve the keypin failure messageNick Mathewson
Closes the human-factors part of ticket 22348.
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.