aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_routerlist.c
AgeCommit message (Collapse)Author
2021-03-12Update copyrights to 2021, using "make update-copyright"Nick Mathewson
2020-10-16test_dir_common: make sure we include pr lines. Fixes 7 tests.Nick Mathewson
2020-07-14addr: Use tor_addr_t instead of uint32_t for IPv4David Goulet
This changes a LOT of code but in the end, behavior is the same. Unfortunately, many functions had to be changed to accomodate but in majority of cases, to become simpler. Functions are also removed specifically those that were there to convert an IPv4 as a host format to a tor_addr_t. Those are not needed anymore. The IPv4 address field has been standardized to "ipv4_addr", the ORPort to "ipv4_orport" (currently IPv6 uses ipv6_orport) and DirPort to "ipv4_dirport". This is related to Sponsor 55 work that adds IPv6 support for relays and this work is needed in order to have a common interface between IPv4 and IPv6. Closes #40043. Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2019-07-25test: Use a 64-bit comparison for logging domains.Nick Mathewson
2019-01-16Bump copyright date to 2019Nick Mathewson
2019-01-09Merge branch 'bug28591_035_squashed'Nick Mathewson
2018-11-29Dir: when Tor's clock is behind, use a future consensus to bootstrapteor
When Tor's clock is behind the clocks on the authorities, allow Tor to bootstrap successfully. Fixes bug 28591; bugfix on 0.2.0.9-alpha.
2018-11-14Move buffers.c out of lib/containers to resolve a circularity.Nick Mathewson
2018-10-31Merge branch 'networkstatus_mmap' into networkstatus_mmap_mergeNick Mathewson
2018-10-01Remove routerparse include from files that dont use itNick Mathewson
2018-10-01extract networkstatus parsing to 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-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-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-11Followup: Make authority_cert_parse_from_string() take length tooNick Mathewson
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-07-05Fix every include path changed in the previous commit (automated)Nick Mathewson
I am very glad to have written this script.
2018-07-01Extract or_state_t to its own header.Nick Mathewson
Fewer modules needed this than I had expected.
2018-07-01Remove other needless includes include from or/*.hNick 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-22Expunge container.hNick Mathewson
2018-06-22Rectify include paths after container split (automatic)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 routerstatus_t into its own header.Nick Mathewson
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-15Split dir_connection_t into its own headerNick Mathewson
2018-05-08Improve tolerance for dirauths with skewed clocksTaylor Yu
Previously, an authority with a clock more than 60 seconds ahead could cause a client with a correct clock to warn that the client's clock was behind. Now the clocks of a majority of directory authorities have to be ahead of the client before this warning will occur. Relax the early-consensus check so that a client's clock must be 60 seconds behind the earliest time that a given sufficiently-signed consensus could possibly be available. Add a new unit test that calls warn_early_consensus() directly. Fixes bug 25756; bugfix on 0.2.2.25-alpha.
2018-05-08Test early-consensus clock skew warningsTaylor Yu
2018-05-08tests: Add "now" param to construct_consensus()Taylor Yu
construct_consensus() in test_routerlist.c created votes using a timestamp from time(). Tests that called construct_consensus() might have nondeterministic results if they rely on time() not changing too much on two successive calls. Neither existing of the two existing tests that calls construct_consensus is likely to have a failure due to this problem.
2018-05-03Merge remote-tracking branch 'isis/bug24660_r1'Nick Mathewson
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-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
2017-12-08Rename connection_free_ to connection_free_minimal.Nick Mathewson
2017-11-09Fix unit test behavior: we need to be in STATE_LIVE.Nick Mathewson
2017-11-01test: Fix SR initialization in routerlist testDavid Goulet
Fixes #24053 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-10-25Fix offending unittest and add changes file for #23862.George Kadianakis
2017-10-25Add a unittest that reveals the offending case of #23862.George Kadianakis
2017-08-24apply ahf's test_assert_null.cocciNick Mathewson
2017-08-24apply ahf's test_assert_int.cocciNick Mathewson
2017-08-24Fix operator usage in src/test/*.cAlexander Færøy
This patch fixes the operator usage in src/test/*.c to use the symbolic operators instead of the normal C comparison operators. This patch was generated using: ./scripts/coccinelle/test-operator-cleanup src/test/*.[ch]
2017-03-15Run the copyright update script.Nick Mathewson
2017-01-18Remove the (no longer compiled) code for legacy guard selection.Nick Mathewson
Part of 20830.
2016-12-16Wrap all of the legacy guard code, and its users, in #ifdefsNick Mathewson
This will make it easier to see what we remove down the line.