aboutsummaryrefslogtreecommitdiff
path: root/src/feature/dirauth/dirvote.c
AgeCommit message (Collapse)Author
2019-12-19Add config object for dirauth; move one option there.Nick Mathewson
I've chosen the "AuthDirMaxServersPerAddr" option here for simplicity, since it is used literally nowhere else besides the dirauth module. Once we have all the infrastructure in place for this, we can move more options into this structure.
2019-06-11Merge branch 'tor-github/pr/1031'David Goulet
2019-05-23Merge branch 'tor-github/pr/988'David Goulet
2019-05-16Prop 301: No longer vote on RecommendedPackagesIain R. Learmonth
This is the first half of implementing proposal 301. The RecommendedPackages torrc option is marked as obsolete and the test cases for the option removed. Additionally, the code relating to generating and formatting package lines in votes is removed. These lines may still appear in votes from other directory authorities running earlier versions of the code and so consensuses may still contain package lines. A new consensus method will be needed to stop including package lines in consensuses. Fixes: #28465
2019-05-07Merge branch 'tor-github/pr/994'David Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-05-02Move voteflags.[ch] to become dirauth only.Nick Mathewson
For various reasons, this was a nontrivial movement. There are several places in the code where we do something like "update the flags on this routerstatus or node if we're an authority", and at least one where we pretended to be an authority when we weren't.
2019-04-30Replace all remaining tor_mem_is_zero() with fast_mem_is_zero()Nick Mathewson
2019-04-29Merge branch 'bug30316_035' into bug30316_040Nick Mathewson
Fixes conflicts and also moves bandwidth-file-digest.
2019-04-29Move bandwidth-file-headers line to appear in the correct vote sectionNick Mathewson
Fixes bug 30316; bugfix on 0.3.5.1-alpha.
2019-04-05crypto_format: Remove the return values from digest256_to_base64()teor
... and ed25519_public_to_base64(). Also remove all checks for the return values, which were redundant anyway, because the functions never failed. Part of 29960.
2019-04-04bwauth: Actually include the bandwidth-file-digest in authority votesteor
Fixes bug 29959; bugfix on 0.4.0.2-alpha.
2019-02-13dirvote: Add the bandwidth file digest in the votejuga0
2019-01-16Bump copyright date to 2019Nick Mathewson
2019-01-16Bump copyright date to 2019.Nick Mathewson
2018-12-05Merge remote-tracking branch 'public/prop298'Nick Mathewson
2018-12-03Keep list of dirauth flags in sync between dirvote.c and fuzz_vrs.cNick Mathewson
Suggested by Teor on PR
2018-11-25Vote on the StaleDesc flag from prop293Nick Mathewson
The StaleDesc flag tells relays that they need to upload a new descriptor soon, or they will drop out of the consensus.
2018-11-24Add a consensus method in which md families get canonicalized.Nick Mathewson
Implements prop298. Closes ticket 28266.
2018-10-31Merge branch 'networkstatus_mmap' into networkstatus_mmap_mergeNick Mathewson
2018-10-01extract networkstatus parsing to its own file.Nick Mathewson
2018-10-01Pull detached-signatures code into dirauth.Nick Mathewson
2018-10-01Split microdescriptor parser into its own file.Nick Mathewson
2018-10-01Split the authority-cert and signature/hash code from routerparseNick Mathewson
2018-10-01Move routerparse and parsecommon to their own module.Nick Mathewson
2018-09-25Rename dirauth/mode.h to dirauth/authmode.hNick Mathewson
This is preparation for having a routermode.h as well
2018-09-21Split directory.c code into several modulesNick Mathewson
Parts of this C file naturally belong in dircache, dirclient, and dircommon: so, move them there.
2018-09-20Split most of dirserv.c into several new modulesNick Mathewson
In dirauth: * bwauth.c reads and uses bandwidth files * guardfraction.c reads and uses the guardfraction file * reachability.c tests relay reachability * recommend_pkg.c handles the recommended-packages lines. * recv_descs.c handles fingerprint files and processing incoming routerinfos that relays upload to us * voteflag.c computes flag thresholds and sets those thresholds on routerstatuses when computing votes In control: * fmt_serverstatus.c generates the ancient "v1 server status" format that controllers expect. In nodelist: * routerstatus_fmt.c formats routerstatus entries for a consensus, a vote, or for the controller.
2018-09-19Split routerlist.c into 4 separate modulesNick Mathewson
There are now separate modules for: * the list of router descriptors * the list of authorities and fallbacks * managing authority certificates * selecting random nodes
2018-09-11Replace "read consensus from disk" with "map consensus from disk".Nick Mathewson
Implements 27244, and should save a bunch of RAM on clients.
2018-09-11Revise networkstatus parsing code to use lengthsNick Mathewson
This way the networkstatus can be parsed without being NUL-terminated, so we can implement 27244 and mmap our consensus objects.
2018-08-29Merge branch 'ticket27246_035_01_squashed'Nick Mathewson
2018-08-29router: Keep RSA onion public key in ASN.1 formatDavid Goulet
The OpenSSL "RSA" object is currently 408 bytes compares to the ASN.1 encoding which is 140 for a 1024 RSA key. We save 268 bytes per descriptor (routerinfo_t) *and* microdescriptor (microdesc_t). Scaling this to 6000 relays, and considering client usually only have microdescriptors, we save 1.608 MB of RAM which is considerable for mobile client. This commit makes it that we keep the RSA onion public key (used for TAP handshake) in ASN.1 format instead of an OpenSSL RSA object. Changes is done in both routerinfo_t and microdesc_t. Closes #27246 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-08-24Merge branch 'maint-0.3.4'Nick Mathewson
2018-07-30Merge remote-tracking branch 'juga/ticket3723_03_squashed_rebased'Nick Mathewson
2018-07-18Add some missing includes and struct declarations.Nick Mathewson
2018-07-18Merge branch 'maint-0.3.4'Nick Mathewson
2018-07-16dirauth: Handle V3BandwidthsFile failure modes according to the new specteor
If an authority is not configured with a V3BandwidthsFile, this line SHOULD NOT appear in its vote. If an authority is configured with a V3BandwidthsFile, but parsing fails, this line SHOULD appear in its vote, but without any headers. Part of 3723, implements the spec in 26799.
2018-07-16Ensure that bw_file_headers is not bigger than maxjuga0
2018-07-16Rename bwlist to bw_file and banwidth tojuga0
bandwidth-file
2018-07-16Do not add bw file line to the votejuga0
when there are not bw file headers lines.
2018-07-16Add the Bandwidth List file headers to votesjuga0
* add bwlist_headers argument to dirserv_read_measured_bandwidth in order to store all the headers found when parsing the file * add bwlist_headers to networkstatus_t in order to store the the headers found by the previous function * include the bandwidth headers as string in vote documents * add test to check that dirserv_read_measured_bandwidth generates the bwlist_headers
2018-07-05Whoops. Protover.[ch] belong in src/core/orNick Mathewson
2018-07-05Fix every include path changed in the previous commit (automated)Nick Mathewson
I am very glad to have written this script.
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.