aboutsummaryrefslogtreecommitdiff
path: root/src/or
AgeCommit message (Collapse)Author
2017-04-27New force-delete option on consensus_cache_delete_pending()Nick Mathewson
If we're out of file space in the storage directory, we'll need to get rid of old files fast.
2017-04-27Lower the file limit in consdiffmgr, to support seccomp2Nick Mathewson
2017-04-27Pass incoming consensus documents to the consdiffmgr codeNick Mathewson
2017-04-27Clean the consdiffmgr cache and launch new diffs as needed.Nick Mathewson
2017-04-27Initialize consdiffmgr when running as (or becoming) a server.Nick Mathewson
2017-04-25Configure sandbox using consdiffmgr; free cdm on exit.Nick Mathewson
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-21hs: Fix a spurious warn in rend_log_intro_limitDavid Goulet
We do dump HS stats now at log info everytime the intro circuit creation retry period limit has been reached. However, the log was upgraded to warning if we actually were over the elapsed time (plus an extra slop). It is actually something that will happen in tor in normal case. For instance, if the network goes down for 10 minutes then back up again making have_completed_a_circuit() return false which results in never updating that retry period marker for a service. Fixes #22032 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-04-18Merge remote-tracking branches 'sebastian/consdiff_add' and ↵Nick Mathewson
'sebastian/consdiff_newline'
2017-04-18prop224: Add time period functions and unittestsGeorge Kadianakis
This will be used by the build blinded key functions. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-04-18Rename `write_to_buf_zlib()` to `write_to_buf_compress()`.Alexander Færøy
See https://bugs.torproject.org/21663
2017-04-18Rename `zlib_state` to `compress_state` in `dir_connection_t`.Alexander Færøy
This patch renames the `zlib_state` field in `dir_connection_t` to `compress_state`. See https://bugs.torproject.org/21663
2017-04-17Refactor the streaming compression code.Alexander Færøy
This patch refactors our streaming compression code to allow us to extend it with non-zlib/non-gzip based compression schemas. See https://bugs.torproject.org/21663
2017-04-17Rename `tor_gzip_{compress,uncompress}` to `tor_{compress,uncompress}`.Alexander Færøy
To allow us to use the API name `tor_compress` and `tor_uncompress` as the main entry-point for all compression/uncompression and not just gzip and zlib. See https://bugs.torproject.org/21663