Nick Mathewson
56b61d1831
Add more tweaks from teor's http fuzzing code.
...
Move option-manipulation code to fuzzing_common.
2017-01-30 08:37:23 -05:00
teor
584d723e04
Restrict fuzzing to the directory headers
2017-01-30 08:37:23 -05:00
Nick Mathewson
949e9827d6
Add a descriptor fuzzing dictionary.
2017-01-30 08:37:23 -05:00
Nick Mathewson
ca657074b9
Fuzzing: initialize siphash key, don't init_logging twice.
2017-01-30 08:37:23 -05:00
Nick Mathewson
0666928c5c
Replace signature-checking and digest-checking while fuzzing
2017-01-30 08:37:22 -05:00
Nick Mathewson
e2aeaeb76c
Make a bunch of signature/digest-checking functions mockable
2017-01-30 08:37:22 -05:00
meejah
fc58c37e33
Ticket #21329 : GETINFO onions/current returns empty list
...
If there are no ephemeral or detached onion services, then
"GETINFO onions/current" or "GETINFO onions/detached" should
return an empty list instead of an error
2017-01-28 13:59:29 -07:00
Nick Mathewson
67eb6470d7
Merge branches 'server_ciphers' and 'ciphers.inc'
2017-01-27 16:45:18 -05:00
Daniel Kahn Gillmor
e1337b4252
client: set IPv6Traffic to on by default
...
See:
https://trac.torproject.org/projects/tor/ticket/21269
https://bugs.debian.org/851798
Closes #21269
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-01-27 09:12:32 -05:00
Nick Mathewson
795582169a
Bulletproof conn_get_outbound_address() a little.
2017-01-27 08:12:14 -05:00
Nick Mathewson
782c52658c
Remove an impossible comparison.
2017-01-27 08:08:08 -05:00
Nick Mathewson
81c78ec755
Outbindbindaddress variants for Exit and OR.
...
Allow separation of exit and relay traffic to different source IP
addresses (Ticket #17975 ). Written by Michael Sonntag.
2017-01-27 08:05:29 -05:00
Nick Mathewson
ad382049ed
Fix a signed/unsigned comparison warning
2017-01-25 13:23:08 -05:00
junglefowl
373d9aff7a
Fail if file is too large to mmap.
...
If tor_mmap_file is called with a file which is larger than SIZE_MAX,
only a small part of the file will be memory-mapped due to integer
truncation.
This can only realistically happen on 32 bit architectures with large
file support.
2017-01-25 13:21:44 -05:00
junglefowl
d5a95e1ea1
Do not truncate too long hostnames
...
If a hostname is supplied to tor-resolve which is too long, it will be
silently truncated, resulting in a different hostname lookup:
$ tor-resolve $(python -c 'print("google.com" + "m" * 256)')
If tor-resolve uses SOCKS5, the length is stored in an unsigned char,
which overflows in this case and leads to the hostname "google.com".
As this one is a valid hostname, it returns an address instead of giving
an error due to the invalid supplied hostname.
2017-01-25 13:13:25 -05:00
Nick Mathewson
363be43df3
Re-run gen_server_ciphers
2017-01-24 15:30:35 -05:00
Nick Mathewson
4f1dc34e36
Regenerate ciphers.inc
2017-01-24 15:05:35 -05:00
Nick Mathewson
12efa1f1cc
Add a unit test for dropguards
2017-01-24 09:18:56 -05:00
Nick Mathewson
818b44cc7c
Repair the (deprecated, ugly) DROPGUARDS controller function.
...
This actually is much easier to write now that guard_selection_t is
first-class.
2017-01-24 09:18:56 -05:00
Nick Mathewson
fae4d3d925
Merge remote-tracking branch 'asn/remove_legacy_guards'
2017-01-24 09:01:25 -05:00
George Kadianakis
b047d97b28
Remove some more remnants of legacy guard selection.
2017-01-24 13:35:57 +02:00
Nick Mathewson
d95d988946
Merge branch 'feature_20956_029'
2017-01-23 16:07:15 -05:00
Nick Mathewson
83307fc267
Add __SocksPort etc variants for non-persistent use
...
Implements feature 20956.
2017-01-23 16:06:51 -05:00
Nick Mathewson
c4cc11a9df
Bump to 0.3.0.2-alpha-dev
2017-01-23 14:38:10 -05:00
Nick Mathewson
0d4d9b6d88
Bump version to 0.2.9.9-dev
2017-01-23 14:34:08 -05:00
Nick Mathewson
beaeee25ae
version bump (0.3.0.2-alpha)
2017-01-23 08:20:46 -05:00
Nick Mathewson
698df98837
version bump
2017-01-23 08:19:48 -05:00
David Goulet
96c7ddbc7e
circuit: Change close reasons from uint16_t to int
...
When marking for close a circuit, the reason value, a integer, was assigned to
a uint16_t converting any negative reasons (internal) to the wrong value. On
the HS side, this was causing the client to flag introduction points to be
unreachable as the internal reason was wrongfully converted to a positive
16bit value leading to flag 2 out of 3 intro points to be unreachable.
Fixes #20307 and partially fixes #21056
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-01-22 19:02:01 -05:00
Nick Mathewson
e52f49aa80
Merge remote-tracking branch 'public/ticket18319'
2017-01-21 14:44:00 -05:00
Nick Mathewson
9023d7361d
Fix return type in test_hs_intropoint.c
...
In trunnel, {struct}_encoded_len() can return negative values.
Coverity caught this as 1398957.
2017-01-19 08:26:55 -05:00
teor
d35ca518b4
Remove extra newline from proxy_prepare_for_restart definition
2017-01-19 08:12:26 -05:00
Nick Mathewson
85a17ee2e7
whitespace fixes
2017-01-18 17:14:42 -05:00
Nick Mathewson
88e4ffab9e
Merge remote-tracking branch 'dgoulet/ticket20029_030_06-resquash'
2017-01-18 17:13:36 -05:00
George Kadianakis
d6c14915cd
Improve a few comments.
...
- Also remove LCOV marks from blocks of code that can be reachable by tests
if we mock relay_send_command_from_edge().
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-01-18 16:59:16 -05:00
David Goulet
50cfc98340
prop224: Add unit tests for INTRODUCE1 support
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-01-18 16:58:54 -05:00
David Goulet
5208085be1
hs: Rename rend_mid_introduce() with legacy semantic
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-01-18 16:58:34 -05:00
David Goulet
db77a38da2
hs: Remove useless code in rend_mid_introduce()
...
With the previous commit, we validate the circuit _before_ calling
rend_mid_introduce() which handles the INTRODUCE1 payload.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-01-18 16:58:34 -05:00
David Goulet
9d7505a62a
prop224: Rename hs_intro_circuit_is_suitable()
...
Adds a better semantic and it also follows the same interface for the
INTRODUCE1 API which is circuit_is_suitable_for_introduce1().
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-01-18 16:58:34 -05:00
David Goulet
e1497744c8
prop224: Add INTRODUCE1 cell relay support
...
Closes #20029
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-01-18 16:58:33 -05:00
Nick Mathewson
d5d7c3e638
Remove argument from guards_choose_dirguard
2017-01-18 15:58:19 -05:00
Nick Mathewson
3efe8bb8ac
Remove some now-spurious blocks and indentation.
2017-01-18 15:45:02 -05:00
Nick Mathewson
5b97d7e110
Remove PDS_FOR_GUARD
2017-01-18 15:42:28 -05:00
Nick Mathewson
6d03e36fd0
Remove GS_TYPE_LEGACY
2017-01-18 15:37:01 -05:00
Nick Mathewson
a31a5581ee
Remove UseDeprecatedGuardAlgorithm.
2017-01-18 15:33:26 -05:00
Nick Mathewson
472b277207
Remove the (no longer compiled) code for legacy guard selection.
...
Part of 20830.
2017-01-18 15:27:10 -05:00
Nick Mathewson
e167a0e17d
Merge remote-tracking branch 'dgoulet/bug21062_030_01'
2017-01-18 15:11:36 -05:00
Nick Mathewson
31dd7dec9a
Merge branch 'bug20684_030_01'
2017-01-18 15:08:42 -05:00
Nick Mathewson
e0e729d4b5
put units in constant names for DIRCACHE_MEN_MEM*
2017-01-18 15:08:10 -05:00
Nick Mathewson
9d47f4d298
Fix a memory leak in bench.c
2017-01-18 14:29:52 -05:00
Neel Chauhan
426ceb41ef
Rename DIRCACHE_MIN_BANDWIDTH and DIRCACHE_MIN_MB_BANDWIDTH
...
Renamed to DIRCACHE_MIN_MEM and DIRCACHE_MIN_MB_MEM.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-01-18 13:15:54 -05:00