aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2017-10-27cargo fmt; fix line length warningsChelsea Holland Komlo
2017-10-27remove experimental rust featuresChelsea Holland Komlo
allow unsafe on function that calls C
2017-10-27update tor_allocate and add testsChelsea Holland Komlo
2017-10-27remove unused include.am for rust modulesChelsea Holland Komlo
2017-10-27refactor smartlist for readabilityChelsea Holland Komlo
limit scoping of unsafe, and other cleanup
2017-10-27move to allocating c strings from rustChelsea Holland Komlo
2017-10-27add tor allocator for rustChelsea Holland Komlo
2017-10-27remove unneeded dependencies, remove types where unnecessaryChelsea Holland Komlo
2017-10-27refactor build infrastructure for single rust binaryChelsea Holland Komlo
2017-10-27use tor allocator for string allocation in rustChelsea Holland Komlo
2017-10-27minimize scope for unsafeChelsea Holland Komlo
update documentation missing check for null
2017-10-27rust implementation of protoverChelsea Holland Komlo
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-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