Commit Graph

33853 Commits

Author SHA1 Message Date
Nick Mathewson 4754e9058b Split getinfo handling into a new control_getinfo.c 2019-03-25 12:49:24 -04:00
Nick Mathewson a49f506e05 Split all controller events code into a new control_events.c
Also, split the formatting code shared by control.c and
control_events.c into controller_fmt.c.
2019-03-25 12:11:59 -04:00
Nick Mathewson 135b51c9d3 practracker: allow comments in exceptions file
Also, distinguish between empty lines (which we should ignore)
and incorrect lines (which we should warn about).
2019-03-25 09:28:24 -04:00
Nick Mathewson a20a2025a5 practracker: sort filenames and directories.
This helps ensure that we'll get output in a stable order.

Closes ticket 29882.
2019-03-25 09:08:04 -04:00
rl1987 68260e85b5 Move sizeof check to torint.h 2019-03-25 10:17:30 +02:00
Taylor Yu 5d2f5e482e Correctly report PT vs proxy during bootstrap
Previously, or_connection_t did not record whether or not the
connection uses a pluggable transport. Instead, it stored the
underlying proxy protocol of the pluggable transport in
proxy_type. This made bootstrap reporting treat pluggable transport
connections as plain proxy connections.

Store a separate bit indicating whether a pluggable transport is in
use, and decode this during bootstrap reporting.

Fixes bug 28925; bugfix on 0.4.0.1-alpha.
2019-03-25 14:13:45 +10:00
teor d4d541c53c Merge remote-tracking branch 'tor-github/pr/785' 2019-03-25 14:01:20 +10:00
Alexander Færøy 4be522b2e6 Pass NULL to lpApplicationName in CreateProcessA().
When NULL is given to lpApplicationName we enable Windows' "magical"
path interpretation logic, which makes Tor 0.4.x behave in the same way
as previous Tor versions did when it comes to executing binaries in
different system paths.

For more information about this have a look at the CreateProcessA()
documentation on MSDN -- especially the string interpretation example is
useful to understand this issue.

This bug was introduced in commit bfb94dd2ca.

See: https://bugs.torproject.org/29874
2019-03-25 03:10:37 +01:00
rl1987 f09205ef53 Refactor test_utils_general() to fix Coverity warnings 2019-03-24 10:10:52 +02:00
rl1987 9529d99982 Tweak changes file 2019-03-24 09:25:30 +02:00
Nick Mathewson 9d0ce0afcc forward-port changelog for 0.4.0.3-alpha 2019-03-23 08:46:29 -04:00
Nick Mathewson 91c24ad530 Merge branch 'maint-0.4.0'
"ours" to avoid version bump
2019-03-23 08:44:44 -04:00
Nick Mathewson 8bc3ac6a84 Bump to 0.4.0.3-alpha-dev 2019-03-23 08:44:36 -04:00
Taylor Yu 307c156fbe Set file encoding in practracker.py
Explicitly set the file encoding to UTF-8 in practracker.py, to avoid
problems in some CI environments.  Fixes bug 29789; bug not in any
released Tor.
2019-03-22 17:51:55 -05:00
Nick Mathewson 22e72eeaa7 Merge branch 'maint-0.4.0' 2019-03-22 11:17:10 -04:00
Nick Mathewson 4b79b43e3e Merge branch 'bug29693_040_radical_squashed' into maint-0.4.0 2019-03-22 11:17:01 -04:00
George Kadianakis a5df9402b6 prob-distr: Decrease false positive rate of stochastic tests. 2019-03-22 11:16:30 -04:00
rl1987 7b30f8dc8c Write missing function comments 2019-03-22 13:04:06 +02:00
rl1987 13b28063f9 Compile time check for being able to fit {unsigned} int inside void pointer 2019-03-22 12:57:58 +02:00
teor f7688cb179 test: Backport the 0.3.4 src/test/test-network.sh to 0.2.9
We need a recent test-network.sh to use new chutney features in CI.

Fixes bug 29703; bugfix on 0.2.9.1-alpha.
2019-03-22 13:20:23 +10:00
teor 15900ab70f Merge remote-tracking branch 'tor-github/pr/819' 2019-03-22 13:10:47 +10:00
George Kadianakis 5729160253 circpad: Rename circpad_machine_state_t to circpad_machine_runtime_t.
The name of circpad_machine_state_t was very confusing since it was conflicting
with circpad_state_t and circpad_circuit_state_t.

Right now here is the current meaning of these structs:

      circpad_state_t -> A state of the state machine.
      circpad_machine_runtime_t -> The current mutable runtime info of the state machine.
      circpad_circuit_state_t -> Circuit conditions based on which we should apply a machine to the circuit
2019-03-22 09:23:05 +10:00
George Kadianakis 846d379b50 circpad/prob_distr: Use crypto_fast_rng() instead of the old RNG. 2019-03-22 09:22:54 +10:00
Nick Mathewson 938d97cb0d Merge branch 'maint-0.4.0'
Ours to avoid version bump.
2019-03-21 09:36:40 -04:00
Nick Mathewson ebc7556dd0 Bump version to 0.4.0.3-alpha 2019-03-21 09:36:19 -04:00
teor 091f8688b8 test/dir: add an extra argument to dirserv_read_measured_bandwidths()
Part of 29806.
2019-03-21 12:56:28 +10:00
teor 3adb689fbc Merge branch 'ticket29806_034_squashed' into ticket29806_035_squashed_merged
Copy and paste the vote=0 code from the old src/or/dirserv.c
to the new src/feature/dirauth/bwauth.c.
2019-03-21 12:04:30 +10:00
juga0 4ab2e9a599 bwauth: Ignore bandwidth file lines with "vote=0"
so that the relays that would be "excluded" from the bandwidth
file because of something failed can be included to diagnose what
failed, without still including these relays in the bandwidth
authorities vote.

Closes #29806.
2019-03-21 12:00:45 +10:00
George Kadianakis bc64fb4e33 circpad: Don't pad if Tor is in dormant mode.
This is something we should think about harder, but we probably want dormant
mode to be more powerful than padding in case a client has been inactive for a
day or so. After all, there are probably no circuits open at this point and
dormant mode will not allow the client to open more circuits.

Furthermore, padding should not block dormant mode from being activated, since
dormant mode relies on SocksPort activity, and circuit padding does not mess
with that.
2019-03-21 10:29:04 +10:00
rl1987 72e0dc0822 Check roundtrip for each bit of {unsigned} int values 2019-03-20 19:06:40 +02:00
rl1987 280109473f Check more values of int 2019-03-20 19:00:03 +02:00
rl1987 0bc9ed9d38 Move casts to separate C file to prevent compiler from optimising them away 2019-03-20 18:54:11 +02:00
Alexander Færøy fbb1c7adfc Handle errors from coveralls more gracefully.
Since we have moved coveralls to the script target the entire build will
now fail if coveralls fail. We handle it more gracefully by echo'ing the
failure instead of doing a hard-failure.

See: https://bugs.torproject.org/29036
2019-03-20 15:44:06 +01:00
Alexander Færøy 0267c453e2 Run make reset-gcov after the script target in Travis CI is done.
This should ensure that GCDA files are never entering the cache of
Travis CI.

See: https://bugs.torproject.org/29036
2019-03-20 15:22:39 +01:00
teor cfcf6de1a8 Changes file for bug 29527
The previous commit introduces these changes:

Stop warning about undefined behavior in the probability distribution
tests. Float division by zero may technically be undefined behaviour in
C, but it's well-defined in IEEE 754.

Partial backport of 29298.

Closes ticket 29527; bugfix on 0.4.0.1-alpha.
2019-03-20 18:07:00 +10:00
George Kadianakis 78a8827fd4 Silence unneeded clang warns that triggered in prob distr tests.
See https://trac.torproject.org/projects/tor/ticket/29528#comment:3
and https://bugs.llvm.org/show_bug.cgi?id=19535
2019-03-20 18:02:54 +10:00
teor ca26567044 Merge branch 'maint-0.4.0' 2019-03-20 09:48:21 +10:00
teor 3871fb732d Merge branch 'maint-0.3.5' into maint-0.4.0 2019-03-20 09:48:12 +10:00
teor 41cd05562f Merge branch 'maint-0.3.4' into maint-0.3.5 2019-03-20 09:48:03 +10:00
teor d7a5fdcb74 Merge branch 'maint-0.2.9' into maint-0.3.4 2019-03-20 09:47:55 +10:00
teor 6bf9078ceb Merge remote-tracking branch 'tor-github/pr/798' into maint-0.3.5 2019-03-20 09:47:31 +10:00
teor db2ac3b9fe Merge remote-tracking branch 'tor-github/pr/774' into maint-0.2.9 2019-03-20 09:46:10 +10:00
Nick Mathewson 2a49b27b9f Merge remote-tracking branch 'tor-github/pr/781' 2019-03-19 10:22:31 -04:00
Nick Mathewson a80131765a Merge branch 'maint-0.4.0' 2019-03-19 09:32:24 -04:00
Nick Mathewson de5ab1ef49 Merge remote-tracking branch 'tor-github/pr/802' into maint-0.4.0 2019-03-19 09:32:05 -04:00
teor 4c22c11136 Merge branch 'maint-0.4.0' 2019-03-19 15:43:42 +10:00
teor b4483edce0 Merge branch 'maint-0.3.5' into maint-0.4.0 2019-03-19 15:43:33 +10:00
teor 17e3eea685 Merge remote-tracking branch 'tor-github/pr/727' into maint-0.3.5 2019-03-19 15:43:05 +10:00
teor af21d126e6 Merge branch 'bug29706_035_minimal_merge' into bug29706_040_minimal_merge
Comment merge.
2019-03-18 11:30:37 +10:00
teor 55865a2c9c Merge branch 'bug29706_034_minimal_merge' into bug29706_035_minimal_merge 2019-03-18 11:29:20 +10:00