Nick Mathewson
986695fb74
When parsing certs cells, allow more certs types
...
Implements the parsing part of #19157
2016-11-03 08:35:36 -04:00
teor
8f465808a0
Check for getpagesize before using it to mmap files
...
This fixes compilation in some MinGW environments.
Fixes bug 20530; bugfix on commit bf72878
in tor-0.1.2.1-alpha.
Reported by "ice".
2016-11-03 08:44:57 +11:00
Ivan Markin
922bc45a56
hs: Added rend_service_is_ephemeral() and made related code use it
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-11-02 10:01:35 -04:00
teor
0ee9049e94
Use the latest options in rend_service_check_private_dir
...
Fixup on both:
* Refactor, adding a create argument... and
* Check every hidden service directory's permissions...
2016-11-02 14:55:14 +11:00
teor
1747f28861
Check every hidden service directory's permissions when configuring
...
Previously, we would only check the last hidden service directory.
Fixes #20529 , bugfix on ticket 13942 commit 85bfad1
in 0.2.6.2-alpha.
2016-11-02 14:32:04 +11:00
teor
01fe039b78
Test single onion service configs where the directory does not exist
...
Runs a test for each combination of create/don't create directories.
Tests #20484 .
2016-11-02 14:17:52 +11:00
teor
13fbbe9cce
Make sure passthrough_test_setup doesn't inadvertently fail or skip tests
...
passthrough_test_setup doesn't pass through arguments if the argument
is equal to 0 or TT_SKIP. Instead, it fails or skips the test.
Assert on this, so we don't accidentally fail or skip tests.
2016-11-02 14:16:14 +11:00
teor
77e1d660ee
Add get_fname_rnd for unit tests that want a unique path every time
2016-11-02 14:14:19 +11:00
teor
d7634dc519
Create get_fname_suffix, and refactor get_fname to use it
2016-11-02 14:13:34 +11:00
teor
2f48693663
Improve comments in check_private_dir and onion poisoning
...
Comment changes only
2016-11-02 14:11:26 +11:00
teor
a906ff88a3
fixup! Refactor, adding a create argument to rend_service_check_private_dir
2016-11-02 14:10:52 +11:00
teor
fedafe7c0e
Use check_private_dir in test_single_onion_poisoning
...
This avoids Win32 conditionals for mkdir.
2016-11-02 11:37:11 +11:00
teor
6c54181559
Remove redundant group permission code from rend_service_check_private_dir
...
check_private_dir already does this for existing directories.
2016-11-02 11:20:49 +11:00
teor
c9db775243
Refactor, adding a create argument to rend_service_check_private_dir
...
It used to be rend_service_check_and_create_private_dir, which always
created the directory.
No behaviour change.
2016-11-02 11:20:19 +11:00
Nick Mathewson
b2f82d45b7
Always call connection_ap_attach_pending() once a second.
...
Fixes bug 19969; bugfix on b1d56fc58
. We can fix this some more in
later Tors, but for now, this is probably the simplest fix possible.
This is a belt-and-suspenders fix, where the earlier fix ("Ask
event_base_loop to finish when we add a pending stream") aims to respond
to new streams as soon as they arrive, and this one aims to make sure
that we definitely respond to all of the streams.
2016-11-01 20:09:44 -04:00
Roger Dingledine
d89804a69d
Ask event_base_loop to finish when we add a pending stream
...
Fixes bug 19969; bugfix on b1d56fc58
. We can fix this some more in
later Tors, but for now, this is probably the right fix for us.
2016-11-01 19:52:55 -04:00
Roger Dingledine
28b755e660
refactor out the tor_event_base_loopexit() call
...
no actual changes
2016-11-01 19:52:54 -04:00
Nick Mathewson
25f53955f6
Merge branch 'maint-0.2.9'
2016-11-01 13:32:29 -04:00
Nick Mathewson
ff3e08f2af
Attempt to fix unit tests on netbsd
2016-11-01 13:32:21 -04:00
Nick Mathewson
cb35a7c271
Merge branch 'maint-0.2.9'
2016-11-01 13:05:45 -04:00
Nick Mathewson
733b245283
Merge remote-tracking branch 'teor/bug20472-029-v2' into maint-0.2.9
2016-11-01 13:05:33 -04:00
Nick Mathewson
db67867a81
Merge remote-tracking branch 'pastly/ticket20486'
2016-11-01 12:55:14 -04:00
Nick Mathewson
e6d84ac04f
Merge branch 'maint-0.2.9'
2016-11-01 12:49:13 -04:00
Nick Mathewson
9248466f0a
Merge branch 'bug20487_029' into maint-0.2.9
2016-11-01 12:44:20 -04:00
Matt Traudt
d8d6d8c206
Update man page that HS directory does not need to exist
2016-11-01 12:32:50 -04:00
Nick Mathewson
68a27dad43
Merge branch 'maint-0.2.9'
2016-10-31 16:33:12 -04:00
Nick Mathewson
e712b5d784
Merge branch 'bug19968_029' into maint-0.2.9
2016-10-31 16:33:03 -04:00
Nick Mathewson
1d76d38903
Re-run trunnel.
2016-10-31 16:25:34 -04:00
David Goulet
0fa671843e
prop224: Add INTRODUCE1 and INTRODUCE_ACK trunnel definition
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-10-31 16:24:30 -04:00
David Goulet
f22eb2730c
prop224: Add ESTABLISH_INTRO and INTRO_ESTABLISHED trunnel definition
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-10-31 16:03:28 -04:00
David Goulet
0ba3444b4a
Make trunnel find files recursively
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-10-31 16:03:28 -04:00
Nick Mathewson
59a78187cd
Merge branch 'maint-0.2.9'
2016-10-31 15:20:45 -04:00
Nick Mathewson
24b7b922ae
Actually free the worker_state_t object when we do an update with it
...
Previously we freed the old "keys" object, but leaked the
worker_state_t that we had taken it from.
Fixes bug 20401; bugfix on 0.2.6.3-alpha.
2016-10-31 15:20:25 -04:00
Nick Mathewson
b858452f94
Add a sentence to the manpage about nonanonymous=>Socksport 0.
...
Closes 20487.
2016-10-31 15:13:27 -04:00
Nick Mathewson
d73c671d6d
policy_is_reject_star():
...
ome policies are default-reject, some default-accept. But
policy_is_reject_star() assumed they were all default_reject. Fix
that!
Also, document that policy_is_reject_star() treats a NULL policy as
empty. This allows us to simplify the checks in
parse_reachable_addresses() by quite a bit.
Fxes bug 20306; bugfix on 0.2.8.2-alpha.
2016-10-31 15:05:56 -04:00
Nick Mathewson
8841a9e396
Create single-onion-service directory before poisoning it, if needed
...
(Also, refactor the code to create a hidden service directory into a
separate funcion, so we don't have to duplicate it.)
Fixes bug 20484; bugfix on 0.2.9.3-alpha.
2016-10-31 14:54:20 -04:00
Nick Mathewson
becc957839
Actually clamp the number of detected CPUs to 16.
...
Previously we said we did, but didn't.
Fixes #19968 ; bugfix on 0.2.3.1-alpha.
2016-10-31 14:19:39 -04:00
teor
3158777d35
Rename routerstatus_version_supports_ntor to *_supports_extend2_cells
...
This helps avoid the confusion that caused bug 20472.
Bugfix on commit 10aa913
from #19163 in tor-0.2.9.3-alpha.
2016-10-31 17:02:21 +11:00
teor
d81f2b5d81
Refactor circuit_pick_create_handshake
...
Make the structure of circuit_pick_create_handshake consistent with
circuit_pick_extend_handshake.
No behaviour change.
2016-10-31 17:01:33 +11:00
teor
26d7a07ad7
In circuit_pick_extend_handshake, assume all hops support EXTEND2 and ntor
...
This simplifies the function: if we have an ntor key, use ntor/EXTEND2,
otherwise, use TAP/EXTEND.
Bugfix on commit 10aa913
from 19163 in 0.2.9.3-alpha.
2016-10-31 17:01:04 +11:00
Nick Mathewson
cac495f0ff
Merge branch 'bug20494'
2016-10-28 22:55:08 -04:00
Nick Mathewson
ada75d5567
Fix bad warning when checking IP policies.
...
I had replaced a comment implying that a set of ifs was meant to be
exhaustive with an actual check for exhaustiveness. It turns out,
they were exhaustive, but not in the way I had assumed. :(
Bug introduced in f3e158edf7
, not in any released Tor.
2016-10-28 15:33:12 -04:00
Matt Traudt
183fbc4137
Hopefully fix int64 comparisons in test_dir_networkstatus_compute_bw_weights_v10
2016-10-28 11:37:28 -04:00
Nick Mathewson
f3e158edf7
Comment the heck out of the stream/circuit attaching process.
2016-10-27 12:04:43 -04:00
David Goulet
70b9e79700
Slightly refactor and fix couple callsites
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-10-27 10:34:02 -04:00
Nick Mathewson
dc79504e2a
Document main.c a lot better
2016-10-27 10:25:26 -04:00
Ivan Markin
23b878b875
Do assert when calling relay_send_command_from_edge() on OR-side circs
2016-10-27 10:19:06 -04:00
Ivan Markin
2d04946960
Do not mark circs for close again after relay_send_command_from_edge()
2016-10-27 10:19:04 -04:00
Nick Mathewson
172b124006
Resolve memory leaks in test_dir_networkstatus_compute_bw_weights_v10
2016-10-27 09:41:19 -04:00
overcaffeinated
e2577cce0c
Convert remaining files to smartlist_add_strdup
...
The coccinelle script produced errors with these test files so
convert the remaining cases of smartlist_add to
smartlist_add_strdup by hand.
2016-10-27 11:15:57 +01:00