Ola Bini
598cd4690c
Make compilation work under gcc-warnings
2015-10-05 14:56:57 -05:00
Ola Bini
3b535869a4
Add tests for parse_port_config
2015-09-15 18:12:14 +02:00
Nick Mathewson
a444b11323
Convince coverity that we do not have a particular memory leak
2015-09-13 14:44:46 -04:00
David Goulet
8b98172579
Add a rend cache failure info dup function
...
When validating a new descriptor against our rend cache failure, we were
added the failure entry to the new cache entry without duplicating. It was
then freed just after the validation ending up in a very bad memory state
that was making tor abort(). To fix this, a dup function has been added and
used just before adding the failure entry.
Fixes #17041
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-09-11 15:09:07 +02:00
Nick Mathewson
41891cbf93
Merge remote-tracking branch 'public/ed25519_hup_v2'
2015-09-10 10:37:13 -04:00
Yawning Angel
f6c446db47
Check NoKeepAliveIsolateSOCKSAuth in a better place.
...
No functional changes, but since NoKeepAliveIsolateSOCKSAuth isn't
part of isoflag, it should be checked where all other similar options
are, and bypass the (no-op) masking at the end.
2015-09-09 13:52:30 +00:00
Nick Mathewson
7ffc048f0a
Make NoKeepAliveIsolateSOCKSAuth work as expected
2015-09-08 14:03:54 -04:00
Nick Mathewson
fcec1f3381
Merge branch 'feature15482_squashed'
2015-09-08 14:03:04 -04:00
Yawning Angel
54510d4d1a
Add KeepAliveIsolateSOCKSAuth
as a SOCKSPort option.
...
This controls the circuit dirtyness reset behavior added for Tor
Browser's user experience fix (#15482 ). Unlike previous iterations
of this patch, the tunable actually works, and is documented.
2015-09-08 14:02:08 -04:00
Nick Mathewson
e73206f681
Only return 0..255 from main().
...
I think this may fix some bugs with windows exit codes being screwy.
2015-09-03 11:38:00 -04:00
Nick Mathewson
eb71777bb2
Merge remote-tracking branch 'dgoulet/bug15963_026_01'
2015-09-02 16:00:07 -04:00
David Goulet
d6bfedb8e5
Don't vote HSDir if we aren't voting Fast
...
Fixes #15963
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-09-02 17:03:00 +02:00
Nick Mathewson
bc64a6b2b9
Fix crashes in tests
2015-09-02 11:02:00 -04:00
David Goulet
07b3028db7
Prohibit the use of one entry node with an HS
...
In a nutshell, since a circuit can not exit at its entry point, it's very
easy for an attacker to find the hidden service guard if only one EntryNodes
is specified since for that guard, the HS will refuse to build a rendezvous
circuit to it.
For now, the best solution is to stop tor to allow a single EntryNodes for
an hidden service.
Fixes #14917
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-09-02 10:47:20 -04:00
Nick Mathewson
f6bd8fbb80
Let recent relays run with the chutney sandbox.
...
Fixes 16965
2015-09-02 09:59:50 -04:00
Nick Mathewson
910e25358a
Let bridge authorities run under the sandbox
...
(found thanks to teor's chutney haxx)
2015-09-02 09:59:22 -04:00
Nick Mathewson
f273295cad
Merge remote-tracking branch 'dgoulet/bug15254_027_01'
2015-09-02 09:05:55 -04:00
Nick Mathewson
db5a9302c1
correct the doc for find_rp_for_intro.
...
Thanks to Roger for spotting this!
2015-09-02 08:51:24 -04:00
Nick Mathewson
4cff437a0a
Remove remaining references to "nulterminate" in comments
...
Thanks to Roger for spotting this!
2015-09-02 08:50:26 -04:00
Nick Mathewson
7153cd5094
Include dns_structs.h in tarball
2015-09-02 08:45:12 -04:00
David Goulet
d40358d91e
Enable hidden service statistics by default
...
HiddenServiceStatistics option is now set to "1" by default.
Fixes #15254
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-09-02 13:53:36 +02:00
Nick Mathewson
fc191df930
Remove the unused "nulterminate" option to buf_pullup()
...
I was going to add a test for this, but I realized that it had no
users. So, removed.
2015-09-01 14:36:25 -04:00
Mike Perry
a16115d9cb
Bug 15482: Don't abandon circuits that are still in use for browsing.
...
Only applies to connections with SOCKS auth set, so that non-web Tor
activity is not affected.
Simpler version of Nick's patch because the randomness worried me, and I'm not
otherwise sure why we want a max here.
2015-09-01 15:21:47 +00:00
Nick Mathewson
d891e2a9c5
missing semicolon
2015-09-01 09:55:20 -04:00
Nick Mathewson
f4ded2cdc9
Fix an always-false check with an assertion
...
In validate_recommended_package_line, at this point in the function,
n_entries is always >= 1. Coverity doesn't like us checking it for
0.
CID 1268063.
2015-09-01 09:52:46 -04:00
Nick Mathewson
b977a570c4
Fix a false-positive in coverity scan with an assertion
...
CID 1301373
2015-09-01 09:50:33 -04:00
Nick Mathewson
f64ef65b9d
Fix code for checking expired certificates on load
...
Fixes CID 1306915, which noticed that the check was dead.
2015-09-01 09:47:51 -04:00
Nick Mathewson
a55f257d6a
Simplify API for find_rp_for_intro()
...
The function now unconditionally allocates a new extend_info_t.
This should convince coverity that we're not leaking memory.
(CID 1311875)
2015-09-01 09:30:48 -04:00
Sebastian Hahn
bbb73eaf31
properly delete current channel in channel_free_list
...
channel_unregister() removes channels from the current smartlist while
we're in a SMORTLIST_FOREACH loop. This only works by accident.
2015-09-01 15:10:10 +02:00
Nick Mathewson
e8675dc7fc
Merge remote-tracking branch 'rl1987/test_dns_resolve_rebased'
2015-08-26 11:32:40 -04:00
Andreas Stieger
19df037e53
Log malformed hostnames in socks5 request respecting SafeLogging
2015-08-25 09:36:34 -04:00
rl1987
77a5ca901f
Unit test dns_resolve(), dns_clip_ttl(), dns_get_expiry_ttl().
2015-08-23 16:02:39 +03:00
Nick Mathewson
80a45835c4
Is this the syntax that will make freebsd make happy?
2015-08-21 12:03:05 -04:00
Nick Mathewson
3b6d2f9bf4
Merge branch 'workqueue_squashed'
2015-08-21 10:37:01 -04:00
Sebastian Hahn
5cf24ff3af
Fix a bunch of check-spaces complaints
2015-08-21 10:36:53 -04:00
Sebastian Hahn
32220d38c0
Ensure worker threads actually exit when it is time
...
This includes a small refactoring to use a new enum (workqueue_reply_t)
for the return values instead of just ints.
2015-08-21 10:36:53 -04:00
Nick Mathewson
b58dfba76f
Rename EVENT_SIGNAL -> EVENT_GOT_SIGNAL
...
This avoids a conflict with a macro decl from libevent 1.x.
Fixes bug 16867; bug not in any released Tor.
2015-08-20 18:42:20 -04:00
Nick Mathewson
037e8763a7
Reload Ed25519 keys on sighup.
...
Closes ticket 16790.
2015-08-19 13:37:21 -04:00
Nick Mathewson
428bb2d1c8
Merge branch 'ed25519_keygen_squashed'
2015-08-19 13:36:59 -04:00
Nick Mathewson
426ef9c8eb
More log messages for keygen problems
2015-08-19 13:36:51 -04:00
Nick Mathewson
c88a8a7ca3
Explain better why we are about to load the master key.
2015-08-19 13:36:51 -04:00
Nick Mathewson
a1b5e8b30b
Don' call failure to get keys a bug; it's possible now.
2015-08-19 13:36:50 -04:00
Nick Mathewson
76ec891572
When we infer the master key from the certificate, save it to disk.
2015-08-19 13:36:50 -04:00
Nick Mathewson
138b28dc35
Add test_keygen tests for all log outputs; improve keygen outputs.
2015-08-19 13:36:50 -04:00
Nick Mathewson
8f6f1544c9
Resolve failing test_keygen tests.
2015-08-19 13:36:50 -04:00
Nick Mathewson
f362e7a873
Checkpoint work on ed25519 keygen improvements.
...
Needs changes file, documentation, test integration, more tests.
2015-08-19 13:36:49 -04:00
Nick Mathewson
2f5202c636
Merge remote-tracking branch 'teor/feature14882-TestingDirAuthVoteIsStrict-v3'
2015-08-18 09:53:50 -04:00
Nick Mathewson
a7de5bd02e
Merge remote-tracking branch 'arma/bug16844-logs'
2015-08-18 09:19:39 -04:00
Nick Mathewson
eafae7f677
Merge branch 'decouple_controller_events_squashed'
2015-08-18 08:56:31 -04:00
Nick Mathewson
9ec94f1d22
Use thread-local storage to block event_queue recursion.
2015-08-18 08:56:23 -04:00