summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-09-29Merge branch 'bug23690_028'Nick Mathewson
2017-09-29Clear outbuf_flushlen when we clear a connection's outbufNick Mathewson
When we added single_conn_free_bytes(), we cleared the outbuf on a connection without setting outbuf_flushlen() to 0. This could cause an assertion failure later on in flush_buf(). Fixes bug 23690; bugfix on 0.2.6.1-alpha.
2017-09-28Merge remote-tracking branch 'catalyst-oniongit/bug23691'Nick Mathewson
2017-09-28Merge remote-tracking branch 'ahf-gitlab/bugs/23551'Nick Mathewson
2017-09-28Merge branch 'maint-0.3.1'Nick Mathewson
2017-09-28Fix leak in test_util.cTaylor Yu
AddressSanitizer found a leak in test_util_decompress_dos_impl(). Fixes bug #23691.
2017-09-28Merge remote-tracking branch 'ahf-gitlab/bugs/23551-maint-0.3.1' into ↵Nick Mathewson
maint-0.3.1
2017-09-28Better error handling when trying to compress/decompress into empty buffer.Alexander Færøy
This patch ensures that we return TOR_COMPRESS_BUFFER_FULL in case we have a input bytes left to process, but are out of output buffer or in case we need to finish where the compression implementation might need to write an epilogue. See: https://bugs.torproject.org/23551
2017-09-28Enable disabled test that was disabled due to bug #23551Alexander Færøy
See: https://bugs.torproject.org/23551
2017-09-28Better error handling when trying to compress/decompress into empty buffer.Alexander Færøy
This patch ensures that we return TOR_COMPRESS_BUFFER_FULL in case we have a input bytes left to process, but are out of output buffer or in case we need to finish where the compression implementation might need to write an epilogue. See: https://bugs.torproject.org/23551
2017-09-28Fix whitespace issue in compress.cAlexander Færøy
2017-09-28Fix typo in buffers.c.Alexander Færøy
2017-09-28Improve unit test coverage for compression code.Nick Mathewson
These tests try uncompressing garbage, verify that we won't make compression bombs, and verify that we won't uncompress compression bombs.
2017-09-28Fix spelling: compressing, not compresingNick Mathewson
2017-09-28Unit test for case where %included dir exists but is unreadableNick Mathewson
2017-09-28unit test for config_lines_dup_and_filterNick Mathewson
2017-09-28Correct docs for config_lines_dup_and_filterNick Mathewson
2017-09-28Move around some LCOV_EXCLs in src/commonNick Mathewson
Apparently, my compiler now generates coverage markers for label-only lines, so we need to exclude those too if they are meant to be unreachable.
2017-09-28Improve cov-diff script to account for new files.Nick Mathewson
2017-09-28Add unit test for buf_get_line().Nick Mathewson
2017-09-28Note an unreachable (?) section in buffers.cNick Mathewson
2017-09-27Let's get 100% coverage for proto_http while we're at it.Nick Mathewson
There was some coverage before, but it was mostly accidental.
2017-09-27Test more error cases of our socks code.Nick Mathewson
Coverage is now respectable. :)
2017-09-27Add unit tests for SOCKS functions that parse server responsesNick Mathewson
We use these when we're acting as a SOCKS client, but we'd never actually written tests for them :/
2017-09-27socks5 unit tests: add check for ipv6 address type.Nick Mathewson
2017-09-27Socks tests for bad socks5 username/passwd auth.Nick Mathewson
2017-09-27Mark some tests in parse_socks.c as unreachable (BUG, LCOV)Nick Mathewson
These tests aren't reachable, given their actual arguments. I'm going to mark them as BUG(), and as unreachable with LCOV.
2017-09-27testing: test many possible truncated SOCKS commandsNick Mathewson
Many of the 'truncated command' paths in fetch_from_buf_socks() were not reached by the tests. This new unit test tries to check them exhaustively.
2017-09-27Move ext_or_command tests to test_proto_misc.cNick Mathewson
No other code changes.
2017-09-27Add unit tests for var_cell and control0 proto functions.Nick Mathewson
2017-09-26Eat redundant semicolonsTaylor Yu
2017-09-26fix the changes fileNick Mathewson
2017-09-26hs-v3: Don't non fatal assert if we can't get the intro extend infoDavid Goulet
Fixes #23159. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-26Merge branch 'ticket23602_029'Nick Mathewson
2017-09-26Merge branch 'typecheck4'Nick Mathewson
2017-09-26changes file for my confparse typechecking funNick Mathewson
2017-09-26Type bug in shared_random_state -- make sure Version is int.Nick Mathewson
The confparse field has type UINT, which corresponds to an int type. We had uint32_t. This shouldn't cause trouble in practice, since int happens to 4-bytes wide on every platform where an authority is running. It's still wrong, though.
2017-09-26Make the TransProxyType field non-constNick Mathewson
The correct type for a STRING confparse value is char *, not const char *.
2017-09-26Correct two state-file variable types.Nick Mathewson
These should have been int, but we had listed them as unsigned. That's an easy mistake to make, since "int" corresponds with either INT or UINT in the configuration file. This bug cannot have actually caused a problem in practice, since we check those fields' values on load, and ensure that they are in range 0..INT32_MAX.
2017-09-26Add test to make sure all confparse variables are well-typedNick Mathewson
New approach, suggested by Taylor: During testing builds, we initialize a union member of an appropriate pointer type with the address of the member field we're trying to test, so we can make sure that the compiler doesn't warn. My earlier approach invoked undefined behavior.
2017-09-26add changes file for 23645Nick Mathewson
2017-09-26Merge remote-tracking branch 'asn/ticket23645_032_01'Nick Mathewson
2017-09-26hs: Improve loggingDavid Goulet
Also demote a log message that can occur under natural causes (if the circuit subsystem is missing descriptors/consensus etc.). The HS subsystem will naturally retry to connect to intro points, so no need to make that log user-facing.
2017-09-25circuit: Log n_circ_id and global identifier of HS circuitsDavid Goulet
So we can track them more easily in the logs and match any open/close/free with those identifiers. Part of #23645 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-25circuit: Log circuit identifiers when cannibalizingDavid Goulet
This removes the "nickname" of the cannibalized circuit last hop as it is useless. It now logs the n_circ_id and global identifier so we can match it with other logging statement. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-25circuit: Keep a copy of n_circ_id for loggingDavid Goulet
Prior to the log statement, the circuit n_circ_id value is zeroed so keep a copy so we can log it at the end. Part of #23645 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-25circuit: Closing reason are signed valuesDavid Goulet
Part of #23645 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-25Merge branch 'bug22109'Nick Mathewson
2017-09-25Make testing rend1_payload variables staticNick Mathewson
This fixes a clang warning.
2017-09-25Merge branch 'bug23539_032_01_squashed'Nick Mathewson