summaryrefslogtreecommitdiff
path: root/src/or/dirserv.h
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-01Extract various enums and tiny structs from or.hNick Mathewson
These all have a logical header to go in.
2018-07-01Minimize headers that include crypto_formats and x25519 stuffNick Mathewson
2018-06-21Rectify include paths (automated).Nick Mathewson
You have no idea how glad I am that this is automated.
2018-06-20Run rectify_include_paths.pyNick Mathewson
2018-06-20Merge branch 'maint-0.3.4'Nick Mathewson
2018-06-20eol@eof in test-dir.cNick Mathewson
2018-06-20Update copyrights to 2018.Nick Mathewson
2018-06-15Move measured_bw_line_t into dirserv.hNick Mathewson
2018-05-01dirvote: Move the vote creation code into dirvote.cDavid Goulet
This code is only for dirauth so this commit moves it into the module in dirvote.c. No code behavior change. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-02-07Fix spelling mistakes corresponding to ticket #23650Deepesh Pathak
2017-12-08Merge branch 'macro_free_v2_squashed'Nick Mathewson
2017-12-08Fix wide lines introduced by previous patch.Nick Mathewson
2017-12-08Replace all FREE_AND_NULL* uses to take a type and a free function.Nick Mathewson
This commit was made mechanically by this perl script: \#!/usr/bin/perl -w -i -p next if /^#define FREE_AND_NULL/; s/\bFREE_AND_NULL\((\w+),/FREE_AND_NULL\(${1}_t, ${1}_free_,/; s/\bFREE_AND_NULL_UNMATCHED\(/FREE_AND_NULL\(/;
2017-12-08Change the free macro convention in the rest of src/or/*.hNick Mathewson
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-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-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-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
2016-12-08Propagate Ed25519 identities downwards into more functions.Nick Mathewson
Actually set ed25519 identities on channels when we set a channel's identity.
2016-09-26Include protocol versions in votes.Nick Mathewson
2016-05-30We no longer generate v0 directories. Remove the code to do soNick Mathewson
2016-05-11Merge branch 'maint-0.2.7' into maint-0.2.8Nick Mathewson
2016-05-11Fix out-of-bounds write during voting with duplicate ed25519 keysJohn Brooks
In dirserv_compute_performance_thresholds, we allocate arrays based on the length of 'routers', a list of routerinfo_t, but loop over the nodelist. The 'routers' list may be shorter when relays were filtered by routers_make_ed_keys_unique, leading to an out-of-bounds write on directory authorities. This bug was originally introduced in 26e89742, but it doesn't look possible to trigger until routers_make_ed_keys_unique was introduced in 13a31e72. Fixes bug 19032; bugfix on tor 0.2.8.2-alpha.
2016-03-21Merge branch 'maint-0.2.7'Nick Mathewson
2016-03-21After we strip out duplicate entries from 'routers', don't use 'rl'.Nick Mathewson
We've got to make sure that every single subsequent calculation in dirserv_generate_networkstatus_vote_obj() are based on the list of routerinfo_t *after* we've removed possible duplicates, not before. Fortunately, none of the functions that were taking a routerlist_t as an argument were actually using any fields other than this list of routers. Resolves issue 18318.DG3.
2016-02-27Update the copyright year.Nick Mathewson
2016-02-10Whitespace fixesNick Mathewson
2016-02-10Rename crypto_digest_all, and digests_t.Nick Mathewson
They are no longer "all" digests, but only the "common" digests. Part of 17795. This is an automated patch I made with a couple of perl one-liners: perl -i -pe 's/crypto_digest_all/crypto_common_digests/g;' src/*/*.[ch] perl -i -pe 's/\bdigests_t\b/common_digests_t/g;' src/*/*.[ch]
2015-08-18Refactor TestingDirAuthVote* into dirserv_set_routerstatus_testingteor
Make it easier to unit test TestingDirAuthVote{Exit,Guard,HSDir} by refactoring the code which sets flags based on them into a new function dirserv_set_routerstatus_testing.
2015-07-31Improve log messages for problems about ed25519 keypinningNick Mathewson
Fixes 16286; bugfix on 0.2.7.2-alpha.
2015-02-18Merge branch 'bug9321_rerebase'Nick Mathewson
Conflicts: src/or/dirvote.h src/test/include.am src/test/test_entrynodes.c
2015-02-18Parse Guardfraction file and apply results to routerstatuses.George Kadianakis
Parse the file just before voting and apply its information to the provided vote_routerstatus_t. This follows the same logic as when dirauths parse bwauth files.
2015-01-10Implement proposal 227-vote-on-package-fingerprints.txtNick Mathewson
This implementation includes tests and a little documentation.
2015-01-02Bump copyright dates to 2015, in case someday this matters.Nick Mathewson
2014-10-28Add another year to our copyright dates.Nick Mathewson
Because in 95 years, we or our successors will surely care about enforcing the BSD license terms on this code. Right?
2014-09-09Remove support for naming directory authoritiesSebastian Hahn
This implements the meat of #12899. This commit should simply remove the parts of Tor dirauths used to check whether a relay was supposed to be named or not, it doesn't yet convert to a new mechanism for reject/invalid/baddir/badexiting relays.
2014-03-18Take out remaining V1 directory code.Karsten Loesing
2014-02-15Remove a bunch of functions that were never called.Nick Mathewson
2014-01-29Rip out all of the v2 directory code.Nick Mathewson
The remaining vestige is that we continue to publish the V2dir flag, and that, for the controller, we continue to emit v2 directory formats when requested.
2013-10-21A Bridge Authority should compute flag thresholdsMatthew Finkel
As a bridge authority, before we create our networkstatus document, we should compute the thresholds needed for the various status flags assigned to each bridge based on the status of all other bridges. We then add these thresholds to the networkstatus document for easy access. Fixes for #1117 and #9859.
2013-07-10Completely refactor how FILENAME_PRIVATE worksNick Mathewson
We previously used FILENAME_PRIVATE identifiers mostly for identifiers exposed only to the unit tests... but also for identifiers exposed to the benchmarker, and sometimes for identifiers exposed to a similar module, and occasionally for no really good reason at all. Now, we use FILENAME_PRIVATE identifiers for identifiers shared by Tor and the unit tests. They should be defined static when we aren't building the unit test, and globally visible otherwise. (The STATIC macro will keep us honest here.) For identifiers used only by the unit tests and never by Tor at all, on the other hand, we wrap them in #ifdef TOR_UNIT_TESTS. This is not the motivating use case for the split test/non-test build system; it's just a test example to see how it works, and to take a chance to clean up the code a little.
2013-04-18Merge branch 'less_charbuf_rebased' into maint-0.2.4Nick Mathewson
Conflicts: src/or/dirserv.c src/or/dirserv.h src/test/test_dir.c
2013-04-18Add a quick-and-dirty-test for generate_v2_networkstatus.Nick Mathewson
It sure is a good thing we can run each test in its own process, or else the amount of setup I needed to do to make this thing work would have broken all the other tests. Test mocking would have made this easier to write too.
2013-04-18Remove some now-needless length definesNick Mathewson
2013-04-18Remove RS_ENTRY_LENNick Mathewson
Nothing uses it any longer now that we use smartlists of strings for stuff that manipulates iles of formatted routerstatuses.