George Kadianakis
06951cb3fc
Merge branch 'tor-github/pr/847' into maint-0.4.0
2019-03-26 15:16:21 +02:00
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
teor
3af9a51118
test/dir: add a 4th argument to dirserv_read_measured_bandwidths()
...
Part of 29806.
2019-03-26 11:49:33 +10:00
teor
b76ae3898d
Merge branch 'ticket29806_035_squashed_merged' into ticket29806_040_squashed_merged
2019-03-26 11:48:52 +10:00
Nick Mathewson
3f0bfe1d29
Rename DISPATCH_DEFINE_TYPE() to DISPATCH_REGISTER_TYPE()
...
Also fix a grammar error in a comment.
2019-03-25 16:35:34 -04:00
Nick Mathewson
8d70f21717
Add a test for pubsub_items_clear_bindings()
2019-03-25 16:35:34 -04:00
Nick Mathewson
b11b4b7bb7
Add test for dispatch_send() fast path.
2019-03-25 16:35:34 -04:00
Nick Mathewson
d976cda49f
pubsub: add test for items_out in builder_finalize()
2019-03-25 16:35:34 -04:00
Nick Mathewson
c40bcab85d
dispatch: Test behavior of formatting type with no set fmt function.
2019-03-25 16:35:34 -04:00
Nick Mathewson
f74301f8fd
Unit test for namemap_fmt_name()
2019-03-25 16:35:34 -04:00
Nick Mathewson
9fb511526a
pubsub test: add a test to make sure typefns can't be changed.
2019-03-25 16:35:34 -04:00
Nick Mathewson
24df14eb09
Pubsub: macros for ease-of-use and typesafety.
2019-03-25 16:35:33 -04:00
Nick Mathewson
a7681525ab
Add function to clear publish bindings.
...
When we clean up, we'd like to clear all the bindings that refer to
a dispatch_t, so that they don't have dangling pointers to it.
2019-03-25 16:35:33 -04:00
Nick Mathewson
9e60482b80
Pubsub: an OO layer on top of lib/dispatch
...
This "publish/subscribe" layer sits on top of lib/dispatch, and
tries to provide more type-safety and cross-checking for the
lower-level layer.
Even with this commit, we're still not done: more checking will come
in the next commit, and a set of usability/typesafety macros will
come after.
2019-03-25 16:35:33 -04:00
Nick Mathewson
e4d3098d4d
Low-level dispatch module for publish-subscribe mechanism
...
This module implements a way to send messages from one module to
another, with associated data types. It does not yet do anything to
ensure that messages are correct, that types match, or that other
forms of consistency are preserved.
2019-03-25 16:35:33 -04:00
Nick Mathewson
253fea84cf
Add a smartlist_grow() function to expand a smartlist
...
Tests included.
2019-03-25 16:35:33 -04:00
Nick Mathewson
dfd7a7f5b6
Add a type to map names to short identifiers
...
We'll be using this for four kinds of identifier in dispatch.c
2019-03-25 16:35:33 -04:00
Nick Mathewson
61cebb2035
Minimize the includes in control.c
2019-03-25 14:14:56 -04:00
Nick Mathewson
2917ecaa97
Split command-handling and authentication from control.c
2019-03-25 14:06:56 -04:00
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
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
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
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