aboutsummaryrefslogtreecommitdiff
path: root/src/or/directory.c
AgeCommit message (Collapse)Author
2018-07-05Move literally everything out of src/orNick Mathewson
This commit won't build yet -- it just puts everything in a slightly more logical place. The reasoning here is that "src/core" will hold the stuff that every (or nearly every) tor instance will need in order to do onion routing. Other features (including some necessary ones) will live in "src/feature". The "src/app" directory will hold the stuff needed to have Tor be an application you can actually run. This commit DOES NOT refactor the former contents of src/or into a logical set of acyclic libraries, or change any code at all. That will have to come in the future. We will continue to move things around and split them in the future, but I hope this lays a reasonable groundwork for doing so.
2018-07-03Merge remote-tracking branch 'github/ticket26626'Nick Mathewson
2018-07-03Fix up some windows compilation issues.Nick Mathewson
These were mostly cases where our previous macros had been casting, and the values that we were trying to printf were not in fact uint64_t.
2018-07-03Return U64_PRINTF_ARG and U64_FORMATNick Mathewson
The standard is printf("%"PRIu64, x);
2018-07-01Extract more constants from or.hNick Mathewson
2018-07-01Minimize headers that include crypto_formats and x25519 stuffNick Mathewson
2018-07-01Remove needless includes from or.hNick Mathewson
or.h should really include only the minimum of stuff from or/*, common/*, and lib/*.
2018-06-29Merge branch 'maint-0.3.4'Nick Mathewson
2018-06-29Merge branch 'maint-0.3.3' into maint-0.3.4Nick Mathewson
2018-06-29Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-06-29Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-06-29Eliminate compat.hNick Mathewson
2018-06-28Fix paths for buffers.h; automated.Nick Mathewson
2018-06-23Fix memory leak in client_likes_consensus().Alexander Færøy
This patches fixes a memory leak in client_likes_consensus() where if consensus_cache_entry_get_voter_id_digests() would fail we would return without having free'd the voters list. See: Coverity CID 1437447
2018-06-21Rectify include paths (automated)Nick Mathewson
2018-06-21Rectify include paths (automated)Nick Mathewson
2018-06-20Run rectify_include_paths.pyNick Mathewson
2018-06-20Update copyrights to 2018.Nick Mathewson
2018-06-15Extract cached_dir_t into a new header.Nick Mathewson
2018-06-15Extract download_status_t into its own header.Nick Mathewson
2018-06-15Extract routerinfo_t into its own header.Nick Mathewson
I was expecting this to be much worse.
2018-06-15Extract authority_cert_t into its own headerNick Mathewson
2018-06-15Extract networkstatus_t and ..sr_info_t into their own headersNick Mathewson
2018-06-15Extract node_t into its own header.Nick Mathewson
2018-06-15Move fp_pair_t declaration to fp_pair.h.Nick Mathewson
2018-06-15Extract rend_service_descriptor_t into its own header.Nick Mathewson
2018-06-15Split dir_connection_t into its own headerNick Mathewson
2018-06-15Split entry and edge_connection_t into their own headers.Nick Mathewson
2018-06-14Move dir_server_t into its own header.Nick Mathewson
2018-06-13Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-06-13Merge branch 'maint-0.3.3'Nick Mathewson
2018-06-11Several attempts to diagnose ticket 25686Nick Mathewson
There are a few reasons that relays might be uploading desciptors without saying X-Desc-Gen-Reason: 1. They are running an old version of our software, before 0.3.2.stable. 2. They are not running our software, but they are claiming they are. 3. They are uploading through a proxy that strips X-Desc-Gen-Reason. 4. They somehow had a bug in their software. According to the 25686 data, 1 is the most common reason. This ticket is an attempt to diagnose case 4, or prove that case 4 doesn't actually happen.
2018-05-03Merge remote-tracking branch 'isis/bug24660_r1'Nick Mathewson
2018-05-02dirauth: Move authdir_mode_v3() to moduleDavid Goulet
This function must return false if the module is not compiled in. In order to do that, we move the authdir_mode_v3() function out of router.c and into the dirauth module new header file named mode.h. It is always returning false if we don't have the module. Closes #25990 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-05-01Merge remote-tracking branch 'dgoulet/ticket25610_034_01-squashed'Nick Mathewson
2018-05-01dirvote: Move the handling of GET /tor/status-vote to dirauth moduleDavid Goulet
In order to further isolate the dirauth code into its module, this moves the handling of the directory request GET /tor/status-vote/* into the module. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-05-01Merge branch 'bug24734_squashed'Nick Mathewson
2018-05-01Remove the return value from the fascist_firewall_choose_address_* family of ↵Neel Chauhan
functions
2018-04-27mod: Move dirauth specific files to its own moduleDavid Goulet
This is a pretty big commit but it only moves these files to src/or/dirauth: dircollate.c dirvote.c shared_random.c shared_random_state.c dircollate.h dirvote.h shared_random.h shared_random_state.h Then many files are modified to change the include line for those header files that have moved into a new directory. Without using --disable-module-dirauth, everything builds fine. When using the flag to disable the module, tor doesn't build due to linking errors. This will be addressed in the next commit(s). No code behavior change. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-04-22Fix an absurdly wide line.Nick Mathewson
2018-04-22Rename find_dl_schedule to find_dl_min_delay.Nick Mathewson
(We no longer need two separate functions here.)
2018-04-22Change the type of "download schedule" from smartlist to int.Nick Mathewson
This is done as follows: * Only one function (find_dl_schedule()) actually returned a smartlist. Now it returns an int. * The CSV_INTERVAL type has been altered to ignore everything after the first comma, and to store the value before the first comma in an int.
2018-04-22Rename *DownloadSchedule to *DownloadInitialDelay; make them intsNick Mathewson
This commit won't compile. It was made with the following perl scripts: s/smartlist_t \*(.*)DownloadSchedule;/int $1DownloadInitialDelay;/; s/\b(\w*)DownloadSchedule\b/$1DownloadInitialDelay/;
2018-04-06crypto: Refactor (P)RNG functionality into new crypto_rand module.Isis Lovecruft
* ADD new /src/common/crypto_rand.[ch] module. * ADD new /src/common/crypto_util.[ch] module (contains the memwipe() function, since all crypto_* modules need this). * FIXES part of #24658: https://bugs.torproject.org/24658
2018-03-03Merge branch 'maint-0.3.3'Nick Mathewson
2018-03-03Merge branch 'ticket23814' into maint-0.3.3Nick Mathewson
2018-02-15Merge remote-tracking branch 'valentecaio/t-24714'Nick Mathewson
2018-02-07Fix spelling mistakes corresponding to ticket #23650Deepesh Pathak
2018-02-01refactor: rename connection_t struct fields.Caio Valente
connection_t.timestamp_lastwritten renamed to connection_t.timestamp_last_write_allowed connection_t.timestamp_lastread renamed to connection_t.timestamp_last_read_allowed Closes ticket 24714.
2018-01-31Remove two vestigial MaxDownloadTries checks from directory.cNick Mathewson
These are no longer meaningful, since there's no longer an upper limit to how many times (in the exponential-backoff world) one can retry a download. download_status_is_ready() didn't check these any more, and neither do we.