Alex Xu (Hello71)
946ed24ca5
Do not page-align mmap length. #25399
2018-03-22 08:47:37 -04:00
Nick Mathewson
fc22bcadb5
Revert 4438ef32's changes to test_address.c
...
Apparently some versions of the mac sdk care about the ordering of
net/if.h wrt other headers.
Fixes bug 25319; bug not in any released tor.
2018-02-21 09:36:37 -05:00
Nick Mathewson
4438ef3288
Remove a bunch of other redundant #includes
...
Folks have found two in the past week or so; we may as well fix the
others.
Found with:
\#!/usr/bin/python3
import re
def findMulti(fname):
includes = set()
with open(fname) as f:
for line in f:
m = re.match(r'^\s*#\s*include\s+["<](\S+)[>"]', line)
if m:
inc = m.group(1)
if inc in includes:
print("{}: {}".format(fname, inc))
includes.add(m.group(1))
import sys
for fname in sys.argv[1:]:
findMulti(fname)
2018-02-20 10:14:15 -05:00
Nick Mathewson
a4ab273a0d
Merge remote-tracking branch 'fristonio/ticket-25261'
2018-02-20 10:03:52 -05:00
Nick Mathewson
5199b9b337
Use autoconf to check for optional zstd functionality.
...
Fixes a bug in our zstd-static code. Bug not in any released
version of Tor.
2018-02-18 16:19:43 -05:00
Nick Mathewson
bbc73c5d1c
Whoops. 256 was not big enough.
2018-02-16 09:40:29 -05:00
Nick Mathewson
a34fc1dad2
Allow checkpointing of non-sha1 digests.
...
This is necessary because apparently v3 rendezvous cpath hops use
sha3, which I had forgotten.
Bugfix on master; bug not in any released Tor.
2018-02-16 09:25:50 -05:00
Neel Chauhan
c2fa743806
Remove the return value of node_get_prim_orport() and node_get_prim_dirport()
2018-02-16 08:20:33 -05:00
Nick Mathewson
200fc8c640
Compilation workaround for windows, which lacks O_SYNC
...
Bug not in any released Tor.
2018-02-16 08:16:12 -05:00
Nick Mathewson
5a9ada342f
tor_zstd_format_version shouldn't be built when !HAVE_ZSTD
...
Fixes bug 25276; bugfix not in any released Tor.
2018-02-16 08:06:01 -05:00
Nick Mathewson
b56fd17d00
Merge branch 'maint-0.3.3'
2018-02-15 21:05:12 -05:00
Nick Mathewson
d662d4470a
Merge remote-tracking branch 'dgoulet/ticket24343_033_01' into maint-0.3.3
2018-02-15 21:05:08 -05:00
Nick Mathewson
d9804691df
Merge remote-tracking branch 'ffmancera-1/bug18918'
2018-02-15 21:00:10 -05:00
Nick Mathewson
92a42f795c
Merge branch 'bug23909'
2018-02-15 20:56:23 -05:00
Nick Mathewson
8da6bfa5de
Merge branch 'bug24914'
2018-02-15 20:53:50 -05:00
Nick Mathewson
4d994e7a9c
Fix a stack-protector warning: don't use a variable-length buffer
...
Instead, define a maximum size, and enforce it with an assertion.
2018-02-15 20:52:01 -05:00
Nick Mathewson
ed1d630f0e
Merge branch 'onion_ntor_malloc_less'
2018-02-15 20:40:03 -05:00
Nick Mathewson
28c3f538e5
Documentation fixes suggested by catalyst.
2018-02-15 20:38:08 -05:00
Nick Mathewson
bda1dfb9e0
Merge remote-tracking branch 'isis/bug25185'
2018-02-15 20:35:30 -05:00
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
Deepesh Pathak
3553383312
ticket 25261: Removed multiple includes of transports.h in connection.c
2018-02-15 22:28:34 +05:30
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
Fernando Fernandez Mancera
3dd2c1d022
Tweaks into router_should_be_dirserver() log msg.
...
Fixed log message that has been changed in commit 5ea993fa5a
.
Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
2018-02-12 12:30:52 +01: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