Commit Graph

26260 Commits

Author SHA1 Message Date
Matt Traudt
b2c56eacdd sched: Remove vanilla sched options that will be going away
- massive change to src/tgest/test_options.c since the sched options
  were added all over the place in it
- removing the sched options caused some tests to pass/fail in new ways
  so I assumed current behavior is correct and made them pass again
   - ex: "ConnLimit must be greater" lines
   - ex: "Authoritative directory servers must" line
- remove test_options_validate__scheduler in prep for new sched tests

Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15 11:40:59 -04:00
Nick Mathewson
e88fb4f4f8 Merge remote-tracking branch 'catalyst-oniongit/bug23532' 2017-09-15 11:17:18 -04:00
Taylor Yu
e31a7be161 Make NETINFO clock skew detection work on clients
An unnecessary routerlist check in the NETINFO clock skew detection in
channel_tls_process_netinfo_cell() was preventing clients from
reporting NETINFO clock skew to controllers.
2017-09-15 09:49:53 -05:00
Taylor Yu
37fed742d1 Refactor channeltls.c lightly
Refactor some repetitive deep indirections in several functions in
channeltls.c into local variables.
2017-09-15 09:49:53 -05:00
Nick Mathewson
e05414d241 Fix several places where md-using relays would get wrong behavior.
This patch replaces a few calls to router_get_by_id_digest ("do we
have a routerinfo?") with connection_or_digest_is_known_relay ("do
we know this relay to be in the consensus, or have been there some
time recently?").

Found while doing the 21585 audit; fixes bug 23533.  Bugfix on
0.3.0.1-alpha.
2017-09-15 09:35:59 -04:00
Nick Mathewson
199f13755b Merge branch 'maint-0.3.1'
"ours" merge to avoid version bump
2017-09-15 09:33:41 -04:00
Nick Mathewson
b440560b8b bump to 0.3.1.7 2017-09-15 09:33:32 -04:00
Nick Mathewson
2c9f8badbd repair test_key_expiration.sh 2017-09-15 09:04:22 -04:00
Nick Mathewson
a213a32b7c Merge remote-tracking branch 'dgoulet/ticket23310_032_02' 2017-09-15 09:01:22 -04:00
Nick Mathewson
7facfc728e Merge branch 'bug23488' 2017-09-15 08:58:20 -04:00
David Goulet
21564c93ce test: Make check-spaces happy
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15 08:34:56 -04:00
David Goulet
44ee5037ea fixup! test: Add HS v3 client-side test for picking intro points
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15 08:34:30 -04:00
Martin Kepplinger
8d913cc352 doc: make introduction paragraph point to correct data
doc/HACKING/GettingStarted.md says "you might like reading doc/HACKING",
which the reader obviously is already doing. Instead point to the "torguts"
documents that are mentioned a few lines below too.
2017-09-15 08:18:37 -04:00
Nick Mathewson
c4c4d03412 Merge remote-tracking branch 'asn/bug23531' 2017-09-15 08:16:20 -04:00
Nick Mathewson
123337bbc9 Merge remote-tracking branch 'teor/ticket23528' 2017-09-15 08:15:36 -04:00
Nick Mathewson
72391fce23 Merge remote-tracking branch 'teor/bug23524' 2017-09-15 08:13:45 -04:00
George Kadianakis
88c58078fa prop224: Add changes file for prop224 2017-09-15 13:23:48 +03:00
George Kadianakis
5cc80692b8 prop224: Fix memleak in client_get_random_intro().
The memleak was occuring because of the way ExcludeNodes is handled in
that function. Basically, we were putting excluded intro points extend
infos in a special variable which was never freed. Also, if there were
multiple excluded intro points then that variable was overwritten
everytime leaking more memory. This commit should fix both issues.
2017-09-15 12:46:26 +03:00
George Kadianakis
e9b4624cc5 test: Add HS v3 client-side test for picking intro points
This commit adds a pretty advanced test for the client-side making sure that
picking intro is done properly.

This unittest also reveals a memleak on the client_pick_intro() function which
is fixed by the subsequent commit.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15 12:46:26 +03:00
George Kadianakis
29aa400908 test: Improve HS v3 helper for building intro points.
Valid intro points need both legacy key and ipv4.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15 12:46:26 +03:00
David Goulet
75ec72f24d test: Unit test for the hs indexes
Using a test vector in python, test both hs_build_hsdir_index() and
hs_build_hs_index().

This commit also adds the hs_build_address.py to EXTRA_DIST which was missing.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15 12:46:26 +03:00
George Kadianakis
715a8ea81c prop224 test: Enrich the client_service_hsdir_set_sync() test.
Do two major improvements:

a) Make the client pick 6 HSDirs instead of just 1 and make sure they
   all match the service's HSDirs.

b) Test two additional missing scenarios borrowed from the
   test_reachability() test.
2017-09-15 12:46:26 +03:00
teor
42e7d0ea14
Explain the restrictions on divisor in round*_to_next_multiple_of
Closes 23528.
2017-09-15 16:06:17 +10:00
teor
6e87c0b23e
Avoid an instance of the bug warning in any_bridge_descriptors_known()
Part of 23524.
2017-09-15 14:17:41 +10:00
teor
61b5d05358
Make control port download status next attempts consistent
Make download status next attempts reported over the control port
consistent with the time used by tor. This issue only occurs if a
download status has not been reset before  it is queried over the
control port.

Fixes 23525, not in any released version of tor.
2017-09-15 14:11:34 +10:00
teor
033691212a
Make an assert into a BUG warning in the bridge code
If future code asks if there are any running bridges, without checking
if bridges are enabled, log a BUG warning rather than crashing.

Fixes 23524 on 0.3.0.1-alpha
2017-09-15 14:02:22 +10:00
teor
d60e7df2da
Explain where bridge download statuses are initialised
And why we can't initialise them on config

Comment-only change, follow-up to 23347.
2017-09-15 13:50:29 +10:00
Nick Mathewson
d6568bad5e Merge branch 'bug23499' 2017-09-14 17:18:38 -04:00
Nick Mathewson
536df21875 Merge branch 'maint-0.3.1' 2017-09-14 13:22:11 -04:00
Nick Mathewson
2446d4acc5 Merge branch 'maint-0.3.0' into maint-0.3.1
"ours" merge to avoid version bump.
2017-09-14 13:22:04 -04:00
Nick Mathewson
e468498469 Merge branch 'maint-0.2.9' into maint-0.3.0
"ours" merge to avoid version bump.
2017-09-14 13:21:52 -04:00
Nick Mathewson
f7b06202c7 Merge branch 'maint-0.2.8' into maint-0.2.9
"ours" merge to avoid version bump.
2017-09-14 13:21:28 -04:00
Nick Mathewson
348b225bd8 version bump: 0.3.0.11 2017-09-14 13:20:52 -04:00
Nick Mathewson
3c6d4fe046 version bump: 0.2.9.12 2017-09-14 13:20:29 -04:00
Nick Mathewson
26f68dfcef version bump: 0.2.8.15 2017-09-14 13:20:14 -04:00
Nick Mathewson
c3063f2432 Remove changes files for items already in release-0.3.1 2017-09-14 13:00:05 -04:00
Nick Mathewson
471e0096ad Merge branch 'maint-0.3.0' into maint-0.3.1 2017-09-14 10:15:38 -04:00
Nick Mathewson
fecad31f10 Merge branch 'maint-0.3.1' 2017-09-14 10:15:38 -04:00
Martin Kepplinger
a971018f6d entrynodes.c: fix syntax error around BUG() statement
Fix those misplaced brackets.

Signed-off-by: Martin Kepplinger <martink@posteo.de>
2017-09-14 10:14:44 -04:00
Nick Mathewson
72b802001c Merge remote-tracking branch 'catalyst-oniongit/skew' 2017-09-14 09:49:11 -04:00
Taylor Yu
0392060863 changes file for clock skew bootstrap errors 2017-09-14 08:35:43 -05:00
Taylor Yu
c0195ccb79 Refactor clock skew handling in networkstatus.c
Move the consensus clock skew handling in
networkstatus_set_current_consensus() to clock_skew_warning().
2017-09-14 08:25:27 -05:00
Taylor Yu
449bb2351e Make trusted clock skew a bootstrap warning
Make clock skew events based on trusted sources produce a bootstrap
warning so controllers can more easily alert users about clock skew
problems.
2017-09-14 08:25:27 -05:00
Taylor Yu
818332e7f1 Refactor control_event_bootstrap_problem
Change the contract of control_event_bootstrap_problem() to be more
general and to take a connection_t.  New function
control_event_bootstrap_prob_or() has the specific or_connection_t
funcionality previously used.
2017-09-14 08:25:27 -05:00
Nick Mathewson
fde18fed60 Merge branch 'bug23019_squashed' 2017-09-14 09:13:28 -04:00
George Kadianakis
0ac2afad0d prop224 client-side: Start validating onion address pubkeys.
Fix the test_build_address() test and its test vectors python script.
They were both using a bogus pubkey for building an HS address which
does not validate anymore.

Also fix a few more unittests that were using bogus onion addresses
and were failing the validation. I replaced the bogus address with
the one generated from the test vector script.
2017-09-14 09:13:11 -04:00
Nick Mathewson
63af663b8c Remove a download_status_reset() call that led to a crash -- see 23347 2017-09-14 08:47:11 -04:00
Nick Mathewson
98c103d91d Rename write_http_status_line, since it does more now. 2017-09-14 08:39:08 -04:00
Nick Mathewson
2385e3f667 Make missing reason_phrase into a BUG(). 2017-09-14 08:34:58 -04:00
Nick Mathewson
3de63fe4b1 Merge branch 'maint-0.3.1' 2017-09-14 07:58:11 -04:00