summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
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-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 'typecheck4'Nick 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-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
2017-09-25Whitespace fix.Nick Mathewson
2017-09-25sched: make interval a plain int; initialize with macroMatt Traudt
2017-09-25sched: Make KISTSchedRunInterval non negativeDavid Goulet
Fixes #23539. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-25Merge remote-tracking branch 'asn/ticket23420_032_01'Nick Mathewson
2017-09-25prop224: Add test for parsing RENDEZVOUS1 cell.George Kadianakis
Just making sure that added padding does not screw up cell parsing.
2017-09-22fix typoRoger Dingledine
2017-09-22Fix check-spaces and a weird copyright.Nick Mathewson
2017-09-22Use setup_full_capture_of_logs for 21800Nick Mathewson
setup_capture_of_logs() doesn't actually suppress warnings :p
2017-09-22Remove unused chosen_scheduler_type variable.Nick Mathewson
2017-09-22Merge remote-tracking branch 'pastly/bug23552_032_03'Nick Mathewson
2017-09-22Merge branch 'bug22805_v2_squashed'Nick Mathewson
2017-09-22Stop using CREATE_FAST as a signifier of clienthood.Nick Mathewson
Relays send it, and we may as well let them. Part of our fix for 22805.
2017-09-22Use channel_is_client() accessor in channelpadding.c.Nick Mathewson
Also, allow channel_is_client() to take a const channel.
2017-09-22Stop clearing the is_client flag on channel directlyNick Mathewson
2017-09-22Remove or_circuit_t.is_first_hop; use channel_is_client() insteadNick Mathewson
The is_first_hop field should have been called used_create_fast, but everywhere that we wanted to check it, we should have been checking channel_is_client() instead.
2017-09-22sched: move code to respect commentsMatt Traudt
The diff is confusing, but were two static scheduler functions that needed moving to static comment block. No code change. Thanks dgoulet for original commit
2017-09-22sched: only log when scheduler type changesMatt Traudt
Closes 23552. Thanks dgoulet for original impl
2017-09-22test_util: capture the log in the correct place.Nick Mathewson
2017-09-21Merge branch 'bug21800'Nick Mathewson
2017-09-21Merge remote-tracking branch 'pastly/bug23581_032_03'Nick Mathewson
2017-09-21Capture "Result does not fit in tor_timegm()" warnings in util testsNick Mathewson
Fixes bug 21800; bugfix on 0.2.9.x
2017-09-21hs: Improve comments for when we change timestampsDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-21sched: Hard exit if we can't select a schedulerDavid Goulet
Fixes #23581 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-21hs: Avoid possible double circuit close on errorDavid Goulet
Fixes #23610 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-21Merge remote-tracking branch 'catalyst-oniongit/bug23607'Nick Mathewson
2017-09-21Merge branch 'maint-0.3.1'Nick Mathewson
2017-09-21Bug 23608: Mock time for all channelpadding tests.Mike Perry
2017-09-20Avoid assertion failure for state file clock skewTaylor Yu
The clock_skew_warning() refactoring allowed calls from or_state_load() to control_event_bootstrap_problem() to occur prior bootstrap phase 0, causing an assertion failure. Initialize the bootstrap status prior to calling clock_skew_warning() from or_state_load().
2017-09-20Use correct sign for state file clock skewTaylor Yu
or_state_load() was using an incorrect sign convention when calling clock_skew_warning() to warn about state file clock skew. This caused the wording of the warning to be incorrect about the direction of the skew.
2017-09-20Use correct name for authtype 3 in a comment.Nick Mathewson
2017-09-20hs: Log the intro point when we clean it upDavid Goulet
When we remove an intro point from the service list, log info about it and some useful data. Signed-off-by: David Goulet <dgoulet@torproject.org>