summaryrefslogtreecommitdiff
path: root/src/or
AgeCommit message (Collapse)Author
2017-04-27Merge branch 'dirreq'Nick Mathewson
2017-04-27Improve control flow in authority_certs_fetch_resource_implNick Mathewson
2017-04-27Include UPLOAD_RENDDESC_V2 in PURPOSE_IS_UPLOADNick Mathewson
This was only used in one place before, and it's safe to update it.
2017-04-26Fix coverity cid 1405510Sebastian Hahn
This is a false positive, but let's appease coverity.
2017-04-25Teach cov-exclude to detect runaway LCOV_EXCL_START linesNick Mathewson
Also, fix two instances of runaway LCOV_EXCL_START lines.
2017-04-25Merge branch 'atomic_counters'Nick Mathewson
2017-04-25Merge remote-tracking branch 'dgoulet/bug21293_031_01'Nick Mathewson
2017-04-25trace: Add a basic event-tracing infrastructure.David Goulet
This commit adds the src/trace directory containing the basics for our tracing subsystem. It is not used in the code base. The "src/trace/debug.h" file contains an example on how we can map our tor trace events to log_debug(). The tracing subsystem can only be enabled by tracing framework at compile time. This commit introduces the "--enable-tracing-debug" option that will make all "tor_trace()" function be maped to "log_debug()". Closes #13802 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-04-25Use atomic counters for compressor allocation.Nick Mathewson
2017-04-25relay: Change LD_BUG log to LD_PROTOCOL_WARNDavid Goulet
That log statement can be triggered if somebody on the Internet behaves badly which is possible with buggy implementation for instance. Fixes #21293 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-04-25Merge branch 'ahf_prop278_21662_squashed'Nick Mathewson
2017-04-25Use `tor_compress_supports_method()` before printing library versions.Alexander Færøy
This patch ensures that Tor checks if a given compression method is supported before printing the version string when calling `tor --library-versions`. Additionally, we use the `tor_compress_supports_method()` to check if a given version is supported for Tor's start-up version string, but here we print "N/A" if a given compression method is unavailable. See: https://bugs.torproject.org/21662
2017-04-25Add `tor_compress_get_total_allocation()` function.Alexander Færøy
This patch adds the `tor_compress_get_total_allocation()` which returns an approximate number of bytes currently in use by all the different compression backends. See: https://bugs.torproject.org/21662
2017-04-25Display LZMA and Zstandard versions when starting Tor.Alexander Færøy
See: https://bugs.torproject.org/21662
2017-04-25Show liblzma and libzstd versions in `tor --library-versions`.Alexander Færøy
See: https://bugs.torproject.org/21662
2017-04-25Add --enable-zstd to our configure script.Alexander Færøy
This patch adds support for enabling support for Zstandard to our configure script. By default, the --enable-zstd option is set to "auto" which means if libzstd is available we'll build Tor with Zstandard support. See: https://bugs.torproject.org/21662
2017-04-25Add --enable-lzma to our configure script.Alexander Færøy
This patch adds support for enabling support for LZMA to our configure script. By default, the --enable-lzma option is set to "auto" which means if liblzma is available we'll build Tor with LZMA support. See: https://bugs.torproject.org/21662
2017-04-25Rename the `torgzip` module to `compress`.Alexander Færøy
See https://bugs.torproject.org/21663
2017-04-25Move zlib compression code into its own module.Alexander Færøy
This patch refactors the `torgzip` module to allow us to extend a common compression API to support multiple compression backends. Additionally we move the gzip/zlib code into its own module under the name `compress_zlib`. See https://bugs.torproject.org/21664
2017-04-24Merge remote-tracking branch 'dgoulet/ticket21980_031_01'Nick Mathewson
2017-04-24Fix a signed/unsigned comparison warning on 32-bitNick Mathewson
2017-04-24Merge branch 'consdiffmgr_squashed'Nick Mathewson
2017-04-24consdiffmgr: add tests for cdm_entry_get_sha3_valueNick Mathewson
2017-04-24Fix reference leak & handle leak in consensus_diff_worker_replyfnNick Mathewson
Found by previous test.
2017-04-24Add a hashtable to consdiffmgr to keep track of diff statusNick Mathewson
In several places in the old code, we had problems that only an in-memory index of diff status could solve, including: * Remembering which diffs were in-progress, so that we didn't re-launch them. * Remembering which diffs had failed, so that we didn't try to recompute them over and over. * Having a fast way to look up the diff from a given consensus to the latest consensus of a given flavor. This patch adds a hashtable mapping from (flavor, source diff), to solve the problem. It maps to a cache entry handle, rather than to a cache entry directly, so that it doesn't affect the reference counts of the cache entries, and so that we don't otherwise need to worry about lifetime management.
2017-04-24Consdiffmgr: extract "get a sha3 digest" function.Nick Mathewson
I'll be using this a lot in the hashtable tweaks here.
2017-04-24consdiffmgr: function to re-validate stored sha3 digests at startupNick Mathewson
2017-04-24Consdiffmgr: use aggressive-release flag on consensusesNick Mathewson
This conscache flag tells conscache that it should munmap the document as soon as reasonably possible, since its usage pattern is expected to not have a lot of time-locality.
2017-04-24Add handle support to consensus_cache_entry_tNick Mathewson
This will allow us to have weak references to cache entries.
2017-04-24Test the easiest cases of consdiffmgr_cleanup.Nick Mathewson
One more to go: deleting the old diffs.
2017-04-24consdiffmgr non-test: check for initialization failureNick Mathewson
Unfortunately, this test doesn't work, so I've left it defined-out. There is currently no way in our unit tests to catch a fatal assertion failure.
2017-04-24Unit tests for consdiffmgr moduleNick Mathewson
Initial tests. These just try adding a few consensuses, looking them up, and making sure that consensus diffs are generated in a more or less reasonable-looking way. It's enough for 87% coverage, but it leaves out a lot of functionality.
2017-04-24Make cpuworker_queue_work function mockable.Nick Mathewson
I'll be using this in the unit tests for consdiffmgr.
2017-04-24Add a "Consensus diff manager" module.Nick Mathewson
This module's job is to remember old consensus documents, to calculate their diffs on demand, and to . There are some incomplete points in this code; I've marked them with "XXXX". I intend to fix them in separate commits, since I believe doing it in separate commits will make the branch easier to review.
2017-04-24Merge branch 'consdiff_numeric_squashed'Nick Mathewson
2017-04-24consdiff: Reject ranges with non-numeric charsSebastian Hahn
Fixes bug #21964
2017-04-24Merge remote-tracking branch 'dgoulet/bug22032_031_01'Nick Mathewson
2017-04-24Add regression test for #22304Taylor Yu
2017-04-24Merge branch 'maint-0.3.0'Nick Mathewson
2017-04-24Merge branch 'maint-0.2.9' into maint-0.3.0Nick Mathewson
2017-04-24control: Wrong check on base16_decode return valueDavid Goulet
The GETINFO extra-info/digest/<digest> broke in commit 568dc27a19 that refactored the base16_decode() API to return the decoded length. Unfortunately, that if() condition should have checked for the correct length instead of an error which broke the command in tor-0.2.9.1-alpha. Fixes #22034 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-04-21Refactor directory_command_should_use_begindir to use directory_request_tNick Mathewson
2017-04-21move the definition of directory_command_should_use_begindirNick Mathewson
2017-04-21Refactor directory_send_command to take a directory_request_tNick Mathewson
2017-04-21Rename, revise, and document directory_request_is_dir_specified.Nick Mathewson
2017-04-21Make directory_request_set_guard_state static.Nick Mathewson
2017-04-21Document the new directory_request_t API and add some assertionsNick Mathewson
2017-04-21Remove old directory_initiate_command_*() functions.Nick Mathewson
2017-04-21Replace remaining directory_initiate_command_* instancesNick Mathewson
2017-04-21Make launch_direct_bridge_descriptor_fetch use dirreqs.Nick Mathewson