Nick Mathewson
acb7a536c2
Merge branch 'maint-0.3.3'
2018-02-15 20:33:00 -05:00
Nick Mathewson
799c82be70
Merge remote-tracking branch 'isis/bug25171' into maint-0.3.3
2018-02-15 20:32:57 -05:00
Nick Mathewson
a1dd8afc16
Merge branch '25162_zstd_static'
2018-02-15 20:28:07 -05:00
Nick Mathewson
066a15af63
This stats_n_seconds_working variable needs to be static now.
...
(When a variable isn't going to be declared extern in the header, we
require that it be static.)
2018-02-15 20:26:09 -05:00
Nick Mathewson
3ca04aada2
Merge remote-tracking branch 'valentecaio/t-25081'
2018-02-15 20:23:23 -05:00
Nick Mathewson
3d7bf98d13
Merge remote-tracking branch 'valentecaio/t-24714'
2018-02-15 20:19:53 -05:00
Isis Lovecruft
5f7d78ce2a
tests: Remove duplicate included header file in src/test/test.c.
...
* FIXES #25271 : https://bugs.torproject.org/25271
2018-02-16 01:19:12 +00:00
Nick Mathewson
3c8a481599
Merge branch 'bug18105'
2018-02-15 20:17:31 -05:00
Nick Mathewson
3e2b48f8b4
Merge branch 'bug24484_squashed'
2018-02-15 20:13:53 -05:00
Nick Mathewson
4dc228e35b
Remove workaround code for systems where free(NULL) is busted.
...
Add an autoconf test to make sure we won't regret it.
Closes ticket 24484.
2018-02-15 20:13:44 -05:00
Nick Mathewson
cfff582e4d
Bump version in master to 0.3.4.0-alpha-dev
2018-02-15 20:11:25 -05:00
Nick Mathewson
5af03c1ef3
rust protover: match the C implementation on empty-str cases
...
Empty versions lists are permitted; empty keywords are not.
2018-02-15 19:08:52 -05:00
Nick Mathewson
b58a2febe3
Forbid u32::MAX as a protover range element in rust
...
Part of the 25249 fix to make rust match the C.
2018-02-15 19:07:38 -05:00
Nick Mathewson
f69510ba4b
Rust protover compat: forbid more than MAX_VERSIONS_TO_EXPAND in a range
...
Also correct MAX_VERSIONS_TO_EXPAND to match the C.
NOTE that this patch leads to incorrect behavior: the C code allows
huge ranges; it just doesn't allow votes on them (currently). For
full compatibility, we'll need to make the rust code store ranges as
ranges natively, possibly using something like the range_map crate.
Still, this patch is smaller than a "proper" fix.
Fixes TROVE-2018-003.
2018-02-15 19:07:25 -05:00
Nick Mathewson
f6a230ec95
Merge remote-tracking branch 'mikeperry/bug24769'
2018-02-14 10:03:14 -05:00
Nick Mathewson
9e566f3a72
Merge branch 'tests_rust'
2018-02-13 18:12:01 -05:00
Nick Mathewson
86f461e362
Merge remote-tracking branch 'dgoulet/ticket24902_029_05'
2018-02-13 15:00:43 -05:00
David Goulet
b60ffc5ce0
Merge remote-tracking branch 'dgoulet/bug25223_029_01' into ticket24902_029_05
2018-02-13 13:11:10 -05:00
David Goulet
305e39d0f8
dos: Add extra safety asserts in cc_stats_refill_bucket()
...
Never allow the function to set a bucket value above the allowed circuit
burst.
Closes #25202
Signed-off-by: David Goulet <dgoulet@torproject.org >
2018-02-13 10:41:21 -05:00
David Goulet
4fe4f8179f
dos: Don't set consensus param if we aren't a public relay
...
We had this safeguard around dos_init() but not when the consensus changes
which can modify consensus parameters and possibly enable the DoS mitigation
even if tor wasn't a public relay.
Fixes #25223
Signed-off-by: David Goulet <dgoulet@torproject.org >
2018-02-13 10:35:41 -05:00
Nick Mathewson
ef164346d4
Merge remote-tracking branch 'dgoulet/ticket24902_029_05'
2018-02-13 08:47:06 -05:00
Nick Mathewson
1555946e20
Have tor_addr hashes return a randomized hash for AF_UNSPEC.
...
We don't expect this to come up very much, but we may as well make
sure that the value isn't predictable (as we do for the other
addresses) in case the issue ever comes up.
Spotted by teor.
2018-02-12 11:14:36 -05:00
Nick Mathewson
99fbbc6c47
Fix a typo in an address_set.c comment.
2018-02-12 11:14:34 -05:00
Nick Mathewson
a75ae628c7
Merge remote-tracking branch 'isis/bug25127_redux'
2018-02-11 16:17:41 -05:00
Nick Mathewson
7aa94f7441
fix compilation.
2018-02-11 16:16:58 -05:00
Nick Mathewson
627974b02e
Merge branch 'bug25120'
2018-02-11 16:10:58 -05:00
Alexander Færøy
14c47a0b5c
Lower log-level in different error conditions in entropy selection.
...
This patch lowers the log-level from warning to info in the cases where
we are going to attempt another method as entropy source to hopefully
make the user feel less concerned.
See: https://bugs.torproject.org/25120
2018-02-11 16:10:50 -05:00
Nick Mathewson
1df701c082
Merge branch 'maint-0.3.2'
2018-02-10 16:09:01 -05:00
Nick Mathewson
4de20d1754
Merge branch 'maint-0.3.1' into maint-0.3.2
2018-02-10 16:09:01 -05:00
Nick Mathewson
86583ad78e
Merge branch 'maint-0.2.9' into maint-0.3.1
2018-02-10 16:09:00 -05:00
Nick Mathewson
320dac4602
Merge branch 'bug24978_029_enable' into maint-0.2.9
2018-02-10 16:08:58 -05:00
Nick Mathewson
791ceb2028
Bump version to 0.3.3.2-alpha-dev
2018-02-10 10:41:23 -05:00
Isis Lovecruft
45c59eff6c
rust: Replace two unwrap()s in FFI code with unwrap_or()s.
2018-02-10 01:21:31 +00:00
Nick Mathewson
9e0d468498
Bump to 0.3.3.2-alpha
2018-02-09 17:25:58 -05:00
Roger Dingledine
99666dc6c4
whitespace and typo cleanups
2018-02-09 17:05:20 -05:00
Nick Mathewson
abdf2a6f7f
Merge remote-tracking branch 'dgoulet/ticket24902_029_05'
2018-02-09 12:08:12 -05:00
David Goulet
1a4fc9cddf
test: DoS test to make sure we exclude known relays
...
Part of #25193
Signed-off-by: David Goulet <dgoulet@torproject.org >
2018-02-09 11:31:01 -05:00
David Goulet
666582a679
dos: Exclude known relays from client connection count
...
This is to avoid positively identifying Exit relays if tor client connection
comes from them that is reentering the network.
One thing to note is that this is done only in the DoS subsystem but we'll
still add it to the geoip cache as a "client" seen. This is done that way so
to avoid as much as possible changing the current behavior of the geoip client
cache since this is being backported.
Closes #25193
Signed-off-by: David Goulet <dgoulet@torproject.org >
2018-02-09 11:13:04 -05:00
Nick Mathewson
549a450f52
Add a "make test-rust" target to run the rust tests only.
2018-02-08 17:51:57 -05:00
Nick Mathewson
d9826b0a30
Merge remote-tracking branch 'frewsxcv/frewsxcv-protover'
2018-02-08 17:45:17 -05:00
Nick Mathewson
af049657eb
Stop claiming that compute_for_old_tor() returns pairs
2018-02-08 17:36:08 -05:00
Nick Mathewson
d8307cb0e9
Remove new unsafe {} use.
...
Rationale: this helps for performance only, but we don't actually
have any reason to think that the checks here are
performance-critical. Let's not normalize the use of unsafe {}.
2018-02-08 17:29:50 -05:00
Nick Mathewson
8d142e2322
Merge remote-tracking branch 'isis/bug25127'
2018-02-08 17:16:14 -05:00
David Goulet
112638921b
Merge branch 'ticket25183_029_01' into ticket24902_029_05
2018-02-08 16:56:21 -05:00
David Goulet
a445327b80
test: Add unit tests for addressset.c
...
This also adds one that tests the integration with the nodelist.
Signed-off-by: David Goulet <dgoulet@torproject.org >
2018-02-08 16:56:05 -05:00
Nick Mathewson
6892d32921
Add an address_set to the nodelist.
...
This set is rebuilt whenever a consensus arrives. In between
consensuses, it is add-only.
2018-02-08 14:40:05 -05:00
Nick Mathewson
0640da4269
Function to add an ipv4 address to an address_set
...
This is a convenience function, so callers don't need to wrap
the IPv4 address.
2018-02-08 14:38:14 -05:00
Nick Mathewson
46bd2aed91
Add an address-set backend using a bloom filter.
...
We're going to need this to make our anti-DoS code (see 24902) more
robust.
2018-02-08 14:38:11 -05:00
Nick Mathewson
84bc75b2e7
Merge branch 'maint-0.3.1' into maint-0.3.2
2018-02-08 10:29:06 -05:00
Nick Mathewson
cce76fbbe2
Merge branch 'maint-0.3.2'
2018-02-08 10:29:06 -05:00