Commit Graph

28460 Commits

Author SHA1 Message Date
Nick Mathewson
2f269bfaf1 Add src/rust/rand to include.am 2018-05-03 16:16:09 -04:00
Nick Mathewson
2d07aef3cc Move some includes around to try to fix windows builds 2018-05-03 16:14:38 -04:00
Nick Mathewson
bd153e4640 Update rust dependencies to latest version. 2018-05-03 13:55:55 -04:00
Nick Mathewson
c3b7258370 Merge remote-tracking branch 'isis/bug24660_r1' 2018-05-03 13:50:18 -04:00
Nick Mathewson
94c6eb7d7f Merge remote-tracking branch 'dgoulet/ticket25991_034_01' 2018-05-03 13:41:34 -04:00
Nick Mathewson
48d8fe533e Merge remote-tracking branch 'dgoulet/ticket25990_034_01' 2018-05-03 13:40:10 -04:00
Nick Mathewson
7f629f7fd9 Merge branch 'maint-0.3.3' 2018-05-03 13:38:54 -04:00
Nick Mathewson
4c6a407b9d Merge branch 'maint-0.3.2' into maint-0.3.3 2018-05-03 13:38:54 -04:00
Nick Mathewson
be5b4415c2 Merge branch 'maint-0.3.1' into maint-0.3.2 2018-05-03 13:38:54 -04:00
Nick Mathewson
6361a250f0 Merge branch 'maint-0.2.9' into maint-0.3.1 2018-05-03 13:38:54 -04:00
Nick Mathewson
44626b37f6 Merge remote-tracking branch 'catalyst-github/bug25936-033' into maint-0.3.3 2018-05-03 13:38:51 -04:00
Nick Mathewson
726f238b72 Merge remote-tracking branch 'catalyst-github/bug25936-031' into maint-0.3.1 2018-05-03 13:38:46 -04:00
Nick Mathewson
5227754b2f Merge remote-tracking branch 'catalyst-github/bug25936-029' into maint-0.2.9 2018-05-03 13:38:37 -04:00
Nick Mathewson
667e66bb09 Merge branch 'maint-0.3.3' 2018-05-03 13:37:37 -04:00
Nick Mathewson
1bbe75da6d Merge remote-tracking branch 'teor/bug25998' into maint-0.3.3 2018-05-03 13:37:33 -04:00
Nick Mathewson
5e0316142f Merge remote-tracking branch 'github/ticket25952' 2018-05-03 11:59:53 -04:00
Nick Mathewson
ed636de4cc Merge remote-tracking branch 'github/ticket25951' 2018-05-03 11:59:31 -04:00
Nick Mathewson
be9f0e5f20 Merge remote-tracking branch 'github/ticket25949' 2018-05-03 11:57:09 -04:00
David Goulet
224c93b976 doc: Add missing HACKING/ files to EXTRA_DIST
Apart from adding the newly created Module.md, this commit also adds all the
missing files we have in HACKING/ to the EXTRA_DIST.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-05-03 11:39:19 -04:00
David Goulet
e12d4286bf doc: Add Module.md explaining Tor modules
Initial document that contains guidelines to write a new module in Tor.

Closes #25991

Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-05-03 11:39:19 -04:00
David Goulet
319505d38c hs-v3: Remove extra white-space and clarify comment
From Neel's latest patch on optimizing the hs_circ_service_get_intro_circ()
digest calculation, remove an extra white-space and clarify a comment of the
legacy key digest to inform when to use it.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-05-03 09:34:50 -04:00
David Goulet
2e8eb1d5e3 Merge remote-tracking branch 'asn/bug23107' 2018-05-03 09:33:42 -04:00
Isis Lovecruft
94dcd38a14
rust: Expose crypto_rand() as an impl of rand_core::RngCore. 2018-05-02 22:12:38 +00:00
Nick Mathewson
eb00eff09d Merge branch 'ticket25997' 2018-05-02 16:03:57 -04:00
David Goulet
1f739e9b06 dirauth: Move authdir_mode_v3() to module
This function must return false if the module is not compiled in. In order to
do that, we move the authdir_mode_v3() function out of router.c and into the
dirauth module new header file named mode.h.

It is always returning false if we don't have the module.

Closes #25990

Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-05-02 13:42:24 -04:00
Nick Mathewson
e386d61c9b Make hs_get_responsible_hsdirs() deterministic.
This test was using the current time to pick the time period number,
and a randomly generated hs key.  Therefore, it sometimes picked an
index that would wrap around the example dht, and sometimes would
not.

The fix here is just to fix the time period and the public key.

Fixes bug 25997; bugfix on 0.3.2.1-alpha.
2018-05-02 10:17:46 -04:00
David Goulet
1ef1ed76d8 dirvote: Fix typo in comment
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-05-02 09:06:40 -04:00
Nick Mathewson
246765342e Merge branch 'maint-0.3.1' into maint-0.3.2 2018-05-02 08:46:28 -04:00
Nick Mathewson
993e314c6f Merge branch 'maint-0.2.9' into maint-0.3.1 2018-05-02 08:46:28 -04:00
Nick Mathewson
c66b512671 Merge branch 'maint-0.3.2' into maint-0.3.3 2018-05-02 08:46:28 -04:00
Nick Mathewson
8625f36de1 Merge branch 'maint-0.3.3' 2018-05-02 08:46:28 -04:00
Nick Mathewson
f26d6ead21 Merge branch 'ticket25996' 2018-05-02 08:45:35 -04:00
teor
d465bd27ed
Stop logging stack contents when reading a zero-length bandwidth file
When directory authorities read a zero-byte bandwidth file, they log
a warning with the contents of an uninitialised buffer. Log a warning
about the empty file instead.

Fixes bug 26007; bugfix on 0.2.2.1-alpha.
2018-05-02 22:36:23 +10:00
Georg Koppen
da8996d611 Bug 26000: Fix missing ";" 2018-05-02 07:46:05 -04:00
George Kadianakis
0c346bdd68 squash! Optimize legacy intro point digest calculation. 2018-05-02 14:09:15 +03:00
Neel Chauhan
af70d3c459 Optimize legacy intro point digest calculation. 2018-05-02 14:08:28 +03:00
teor
d96ddf8f1b
man page: FetchUselessDescriptors and DirCache exclude extra infos 2018-05-02 11:29:48 +10:00
teor
4a7590c241
man page: UseMicrodescriptors auto and 1 are the same now 2018-05-02 10:46:10 +10:00
teor
9b1d5e8826
man page: FetchUselessDescriptors stops tor going idle
Also explain how FetchUselessDescriptors and UseMicrodescriptors are
different.

Closes 25998.
2018-05-02 10:46:00 +10:00
Nick Mathewson
a2b53c1d0b coverage: Repeat the test for avoiding failed intro points
This test, in test_client_pick_intro(), will have different coverage
depending on whether it selects a good intro point the first time or
whether it has to try a few times.  Since it produces the shorter
coverage with P=1/4, repeat this test 64 times so that it only
provides reduced coverage with P=1/2^128.  The performance cost is
negligible.

Closes ticket 25996.  This test was introduced in 0.3.2.1-alpha.
2018-05-01 19:58:39 -04:00
Nick Mathewson
60fad8d41f Stop using approx_time() in circuitmux_ewma.
It doesn't match with the tick-count code any longer.

Bug not in any released Tor.
2018-05-01 18:28:01 -04:00
Nick Mathewson
5c5392fea7 Merge remote-tracking branch 'github/eliminate_gettimeofday_cached' 2018-05-01 13:27:02 -04:00
Nick Mathewson
b396e4e429 Move unreachable port warnings to a periodic event.
Arguably, the conditions under which these events happen should be a
bit different, but the rules are complex enough here that I've tried
to have this commit be pure refactoring.

Closes ticket 25952.

Finally, before this code goes away, take a moment to look at the
amazing way that we used to try to have an event happen
every N seconds:

      get_uptime() / N != (get_uptime()+seconds_elapsed) / N

Truly, it is a thing of wonder.  I'm glad we didn't start using this
pattern everywhere else.
2018-05-01 13:14:18 -04:00
Alexander Færøy
60a2c92d10 Build Tor without dirauth module in Travis.
See: https://bugs.torproject.org/25953
2018-05-01 12:11:09 -04:00
David Goulet
895d20ab4b Add changes file for #25610
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-05-01 11:45:34 -04:00
David Goulet
2b6c13267f dirvote: Make tokens a const in dirvote_parse_sr_commits()
Part of #25988

Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-05-01 11:45:34 -04:00
David Goulet
5db331e8fc Make find_opt_by_keyword() take a const smartlist
Part of #25988

Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-05-01 11:45:34 -04:00
David Goulet
70c92c3366 sr: Rename shared_random_common.{c|h} to shared_random_client.{c|h}
No code behavior change.

Pars of #25988

Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-05-01 11:45:34 -04:00
David Goulet
2d79d0155e vote: Move dirvote_recalculate_timing() to voting_schedule.c
By doing so, it is renamed to voting_schedule_recalculate_timing(). This
required a lot of changes to include voting_schedule.h everywhere that this
function was used.

This effectively now makes voting_schedule.{c|h} not include dirauth/dirvote.h
for that symbol and thus no dependency on the dirauth module anymore.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-05-01 11:45:34 -04:00
David Goulet
e504b1b358 vote: Namespace functions in voting_schedule.c
Rename them from dirvote_* to voting_schedule_*.

No code behavior change.

Part of #25988

Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-05-01 11:43:23 -04:00