Commit Graph

3960 Commits

Author SHA1 Message Date
teor
613c5ff357
Merge remote-tracking branch 'tor-github/pr/724' 2019-03-26 19:31:17 +10:00
teor
0642650865
Merge branch 'maint-0.4.0' 2019-03-26 19:16:06 +10:00
teor
4258728d56
Merge remote-tracking branch 'tor-github/pr/852' into maint-0.4.0 2019-03-26 19:15:46 +10:00
rl1987
4e6ba575a6 Add header guards to ptr_helpers.h 2019-03-26 09:49:32 +02:00
juga0
da7a8d7624
dircache: fix identation and remove unneded goto 2019-03-26 17:41:17 +10:00
juga0
a4bf3be8bc
test: check that .../bandwidth.z is compressed 2019-03-26 17:41:09 +10:00
juga0
fb4a40c32c
test: Check bw file cache lifetime 2019-03-26 17:41:06 +10:00
juga0
3eacae42b2
Serve bandwidth file used in the next vote
When a directory authority is using a bandwidth file to obtain the
bandwidth values that will be included in the next vote, serve this
bandwidth file at /tor/status-vote/next/bandwidth.z.
2019-03-26 17:40:45 +10:00
teor
d482913e69
Merge remote-tracking branch 'tor-github/pr/834' 2019-03-26 12:55:48 +10:00
rl1987
68260e85b5 Move sizeof check to torint.h 2019-03-25 10:17:30 +02:00
teor
d4d541c53c
Merge remote-tracking branch 'tor-github/pr/785' 2019-03-25 14:01:20 +10:00
rl1987
f09205ef53 Refactor test_utils_general() to fix Coverity warnings 2019-03-24 10:10:52 +02:00
Nick Mathewson
22e72eeaa7 Merge branch 'maint-0.4.0' 2019-03-22 11:17:10 -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
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
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
teor
41cd05562f
Merge branch 'maint-0.3.4' into maint-0.3.5 2019-03-20 09:48:03 +10:00
Nick Mathewson
a80131765a Merge branch 'maint-0.4.0' 2019-03-19 09:32:24 -04: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
teor
aec6ee201b
test/sr: update sr_state_free() to sr_state_free_all() in a comment 2019-03-18 11:28:34 +10:00
teor
1d0146e2a2
Merge branch 'bug29706_029_minimal' into bug29706_034_minimal_merge 2019-03-18 11:27:59 +10:00
teor
c44ad396f8
test/sr: Clear SRVs after init, and before setup
Already merged to 0.4.0 and later in tor-github/pr/776.
Backported to 0.2.9 and later with minor comment changes.

Part of 29706.
2019-03-18 11:12:25 +10:00
Nick Mathewson
1cffacdaf5 Merge branch 'maint-0.4.0' 2019-03-15 08:54:39 -04:00
Nick Mathewson
560ba98dd7 Merge remote-tracking branch 'tor-github/pr/776' into maint-0.4.0 2019-03-15 08:54:30 -04:00
David Goulet
aee65084b4 circ: Remove n_mux and p_mux members
They are simply not used apart from assigning a pointer and asserting on the
pointer depending on the cell direction.

Closes #29196.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-03-14 23:54:05 -04:00
teor
c03b1b3f08
Merge remote-tracking branch 'tor-github/pr/794' into maint-0.3.4 2019-03-14 06:55:57 +10:00
teor
2840580cf2
Merge remote-tracking branch 'nickm/bug27073_029' into bug27073_034
Replace == with OP_EQ in test macros.
2019-03-14 06:47:32 +10:00
teor
5606cfae47
Merge remote-tracking branch 'tor-github/pr/771' into maint-0.3.4 2019-03-14 06:41:14 +10:00
Nick Mathewson
cab93930de Merge branch 'pr_722_squashed' 2019-03-13 10:37:37 -04:00
George Kadianakis
a71999462b Fix test prob distr parameters that caused warnings.
They were causing the following warnings in circuitpadding/circuitpadding_sample_distribution:

     src/lib/math/prob_distr.c:1311:17: runtime error: division by zero
     SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/lib/math/prob_distr.c:1311:17 in
     src/lib/math/prob_distr.c:1219:49: runtime error: division by zero
     SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/lib/math/prob_distr.c:1219:49 in

because the distributions were called with erroneous parameters (e.g. geometric
distribution with p=0).

We now defined these test probability distributions with more realistic
parameters.

As far as the circuitpadding_sample_distribution() test is concerned, it
doesn't matter if the distributions return values outside of [0,10] since we
already restrict the values into that interval using min=0 and max=10 (and RTT
estimate is disabled).
2019-03-13 10:36:26 -04:00
Nick Mathewson
58fd864a85 Merge remote-tracking branch 'tor-github/pr/705' 2019-03-13 09:36:47 -04:00
George Kadianakis
cdaff26f91 circpad: Machines MUST have strictly increasing histogram edges.
Add a basic validation function for the histograms. It can be a building block
for the future
2019-03-13 13:35:52 +02:00
teor
a9c3101e21 test/sr: Clear SRVs after init, and before setup
Part of 29706.
2019-03-13 15:29:46 +10:00
Nick Mathewson
065b74fa36 Fix all nonconformant headers' guard macros. 2019-03-12 15:20:22 -04:00
George Kadianakis
18a4f535d3 Merge branch 'maint-0.4.0' 2019-03-12 18:11:53 +02:00
George Kadianakis
0ce32affc2 Merge branch 'tor-github/pr/763' into maint-0.4.0 2019-03-12 18:11:35 +02:00
Nick Mathewson
61adcb22c5 Merge branch 'bug23576-041-rebased-squashed' 2019-03-12 11:10:01 -04:00
teor
257cea8876 test/hs: minor hs test fixes
Cleanup some bugs discovered during 23576:

* stop copying the first 20 characters of a 40-character hex string
  to a binary fingerprint
* stop putting IPv6 addresses in a variable called "ipv4"
* explain why we do a duplicate tt_int_op() to deliberately fail and
  print a value

Fixes bug 29243; bugfix on 0.3.2.1-alpha.
2019-03-12 11:09:53 -04:00
teor
bb98bc8562 hs: abolish hs_desc_link_specifier_t
The previous commits for 23576 confused hs_desc_link_specifier_t
and link_specifier_t. Removing hs_desc_link_specifier_t fixes this
confusion.

Fixes bug 22781; bugfix on 0.3.2.1-alpha.
2019-03-12 11:09:53 -04:00
Nick Mathewson
c01c6123fa Merge remote-tracking branch 'tor-github/pr/779' 2019-03-12 11:05:27 -04:00
Nick Mathewson
1c9b629284 Merge branch 'maint-0.4.0' 2019-03-12 11:03:47 -04:00
Nick Mathewson
9c9214f2c9 Merge remote-tracking branch 'tor-github/pr/776' into maint-0.4.0 2019-03-12 11:03:37 -04:00