]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
8 years agoIntoduce unittest for skipping outdated dirservers.
George Kadianakis [Mon, 6 Nov 2017 13:45:42 +0000 (15:45 +0200)] 
Intoduce unittest for skipping outdated dirservers.

8 years agoFix a wide comment
Nick Mathewson [Fri, 17 Nov 2017 14:57:15 +0000 (09:57 -0500)] 
Fix a wide comment

8 years agoMerge branch 'bug23817_031' into maint-0.3.2
Nick Mathewson [Fri, 17 Nov 2017 14:56:53 +0000 (09:56 -0500)] 
Merge branch 'bug23817_031' into maint-0.3.2

8 years agoMake should_set_md_dirserver_restriction() look at num filtered guards
Nick Mathewson [Thu, 16 Nov 2017 13:49:24 +0000 (08:49 -0500)] 
Make should_set_md_dirserver_restriction() look at num filtered guards

This seems closer to what the code intended.

8 years agoSkip dirserver restrictions in small networks.
George Kadianakis [Mon, 13 Nov 2017 20:26:22 +0000 (22:26 +0200)] 
Skip dirserver restrictions in small networks.

8 years agoIntroduce new guard restriction and use it to skip outdated dirs.
George Kadianakis [Mon, 6 Nov 2017 17:38:47 +0000 (19:38 +0200)] 
Introduce new guard restriction and use it to skip outdated dirs.

8 years agoIntroduce cache for outdated microdesc dirservers.
George Kadianakis [Mon, 6 Nov 2017 12:48:22 +0000 (14:48 +0200)] 
Introduce cache for outdated microdesc dirservers.

We gonna use this cache to avoid dirservers without outdated md info.

8 years agoOnly log about lost KIST support once
Matt Traudt [Thu, 16 Nov 2017 19:38:39 +0000 (14:38 -0500)] 
Only log about lost KIST support once

8 years agoUse less jargon in Scheduler sec. of man page
Matt Traudt [Thu, 16 Nov 2017 19:32:17 +0000 (14:32 -0500)] 
Use less jargon in Scheduler sec. of man page

8 years agoAdd notes about OS support for our scheduler types
Matt Traudt [Thu, 16 Nov 2017 14:21:12 +0000 (09:21 -0500)] 
Add notes about OS support for our scheduler types

8 years agoMerge remote-tracking branch 'dgoulet/bug23861_032_01' into maint-0.3.2
Nick Mathewson [Fri, 17 Nov 2017 14:23:04 +0000 (09:23 -0500)] 
Merge remote-tracking branch 'dgoulet/bug23861_032_01' into maint-0.3.2

8 years agoMerge branch 'bug24167_025' into maint-0.3.2
Nick Mathewson [Fri, 17 Nov 2017 13:35:52 +0000 (08:35 -0500)] 
Merge branch 'bug24167_025' into maint-0.3.2

8 years agoMerge branch 'ticket24097_032' into maint-0.3.2
Nick Mathewson [Fri, 17 Nov 2017 13:35:01 +0000 (08:35 -0500)] 
Merge branch 'ticket24097_032' into maint-0.3.2

8 years agoMerge branch 'bug20963_032' into maint-0.3.2
Nick Mathewson [Fri, 17 Nov 2017 13:34:05 +0000 (08:34 -0500)] 
Merge branch 'bug20963_032' into maint-0.3.2

8 years agoFix a traceback when closing a blocked connection "immediately".
Nick Mathewson [Thu, 16 Nov 2017 16:45:15 +0000 (11:45 -0500)] 
Fix a traceback when closing a blocked connection "immediately".

When we close a connection via connection_close_immediately, we kill
its events immediately. But if it had been blocked on bandwidth
read/write, we could try to re-add its (nonexistent) events later
from connection_bucket_refill -- if we got to that callback before
we swept the marked connections.

Fixes bug 24167.  Fortunately, this hasn't been a crash bug since we
introduced connection_check_event in 0.2.9.10, and backported it.

This is a bugfix on commit 89d422914a0c3cb, I believe, which
appeared in Tor 0.1.0.1-rc.

8 years agorelay: Avoid extra LOG_NOTICE for every new descriptor batch
David Goulet [Thu, 16 Nov 2017 15:51:41 +0000 (10:51 -0500)] 
relay: Avoid extra LOG_NOTICE for every new descriptor batch

Commit 56c5e282a733912776f6dacbe4f5df66b4fb9606 suppressed that same log
statement in directory_info_has_arrived() for microdescriptors so do the same
for the descriptors. As the commit says, we already have the bootstrap
progress for this.

Fixes #23861

Signed-off-by: David Goulet <dgoulet@torproject.org>
8 years agoDowngrade evdns warnings about weird replies.
Nick Mathewson [Thu, 16 Nov 2017 14:30:19 +0000 (09:30 -0500)] 
Downgrade evdns warnings about weird replies.

evdns is allowed to give us unrecognized object types; it is allowed
to give us non-IPv4 answer types, and it is (even) allowed to give
us empty answers without an error.

Closes ticket 24097.

8 years agoMerge branch 'bug24279_030' into maint-0.3.2
Nick Mathewson [Wed, 15 Nov 2017 20:11:26 +0000 (15:11 -0500)] 
Merge branch 'bug24279_030' into maint-0.3.2

8 years agowhoops; add missing credit.
Nick Mathewson [Wed, 15 Nov 2017 20:11:15 +0000 (15:11 -0500)] 
whoops; add missing credit.

8 years agoMerge branch 'bug24279_030' into maint-0.3.2
Nick Mathewson [Wed, 15 Nov 2017 20:09:33 +0000 (15:09 -0500)] 
Merge branch 'bug24279_030' into maint-0.3.2

8 years agoChanges file for 24279.
Nick Mathewson [Wed, 15 Nov 2017 20:09:11 +0000 (15:09 -0500)] 
Changes file for 24279.

8 years agoFix configure libevent memory leak
Alex Xu (Hello71) [Sun, 29 Oct 2017 13:14:58 +0000 (13:14 +0000)] 
Fix configure libevent memory leak

Breaks build with externally-specified hardening flags.

8 years agoTweak the message when we re-enable CBT.
Nick Mathewson [Wed, 15 Nov 2017 19:42:59 +0000 (14:42 -0500)] 
Tweak the message when we re-enable CBT.

Implements ticket 20963.

8 years agoMerge remote-tracking branch 'asn/bug23662_032' into maint-0.3.2
Nick Mathewson [Wed, 15 Nov 2017 19:25:20 +0000 (14:25 -0500)] 
Merge remote-tracking branch 'asn/bug23662_032' into maint-0.3.2

8 years agoMerge remote-tracking branch 'dgoulet/bug24230_032_01' into maint-0.3.2
Nick Mathewson [Tue, 14 Nov 2017 19:45:07 +0000 (14:45 -0500)] 
Merge remote-tracking branch 'dgoulet/bug24230_032_01' into maint-0.3.2

8 years agoSilence a warning about failed descriptor uploads.
George Kadianakis [Tue, 14 Nov 2017 15:16:33 +0000 (17:16 +0200)] 
Silence a warning about failed descriptor uploads.

Due to #23662 this can happen under natural causes and does not disturb
the functionality of the service. This is a simple 0.3.2 fix for now,
and we plan to fix this properly in 0.3.3.

8 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Tue, 14 Nov 2017 01:36:04 +0000 (20:36 -0500)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

8 years agoMerge branch 'maint-0.2.9' into maint-0.3.0
Nick Mathewson [Tue, 14 Nov 2017 01:36:04 +0000 (20:36 -0500)] 
Merge branch 'maint-0.2.9' into maint-0.3.0

8 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Tue, 14 Nov 2017 01:36:04 +0000 (20:36 -0500)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

8 years agoMerge branch 'bug22895_027' into maint-0.2.9
Nick Mathewson [Tue, 14 Nov 2017 01:35:59 +0000 (20:35 -0500)] 
Merge branch 'bug22895_027' into maint-0.2.9

8 years agoadd a missing subcategory to 23637, again
Nick Mathewson [Mon, 13 Nov 2017 21:58:11 +0000 (16:58 -0500)] 
add a missing subcategory to 23637, again

8 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Mon, 13 Nov 2017 17:57:58 +0000 (12:57 -0500)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

8 years agoMerge branch 'maint-0.2.9' into maint-0.3.0
Nick Mathewson [Mon, 13 Nov 2017 17:57:58 +0000 (12:57 -0500)] 
Merge branch 'maint-0.2.9' into maint-0.3.0

8 years agoMerge branch 'maint-0.2.8' into maint-0.2.9
Nick Mathewson [Mon, 13 Nov 2017 17:57:58 +0000 (12:57 -0500)] 
Merge branch 'maint-0.2.8' into maint-0.2.9

8 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Mon, 13 Nov 2017 17:57:58 +0000 (12:57 -0500)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

8 years agoMerge branch 'bug23291_028' into maint-0.2.8
Nick Mathewson [Mon, 13 Nov 2017 17:57:55 +0000 (12:57 -0500)] 
Merge branch 'bug23291_028' into maint-0.2.8

8 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Mon, 13 Nov 2017 17:27:36 +0000 (12:27 -0500)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

8 years agohs-v3: Fix consensus param "hsdir-interval" name
David Goulet [Mon, 13 Nov 2017 16:48:56 +0000 (11:48 -0500)] 
hs-v3: Fix consensus param "hsdir-interval" name

The dir-spec.txt specifies it to be "hsdir_interval" (underscore).

Fixes #24262

Signed-off-by: David Goulet <dgoulet@torproject.org>
8 years agoMerge remote-tracking branch 'arma/ticket23637' into maint-0.3.2
Nick Mathewson [Mon, 13 Nov 2017 16:20:20 +0000 (11:20 -0500)] 
Merge remote-tracking branch 'arma/ticket23637' into maint-0.3.2

8 years agoMerge branch 'bug24247_032' into maint-0.3.2
Nick Mathewson [Mon, 13 Nov 2017 16:19:09 +0000 (11:19 -0500)] 
Merge branch 'bug24247_032' into maint-0.3.2

8 years agoMerge branch 'maint-0.2.9' into maint-0.3.0
Nick Mathewson [Mon, 13 Nov 2017 16:18:02 +0000 (11:18 -0500)] 
Merge branch 'maint-0.2.9' into maint-0.3.0

8 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Mon, 13 Nov 2017 16:18:02 +0000 (11:18 -0500)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

8 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Mon, 13 Nov 2017 16:18:02 +0000 (11:18 -0500)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

8 years agoMerge remote-tracking branch 'teor/bug23470-029' into maint-0.2.9
Nick Mathewson [Mon, 13 Nov 2017 16:17:58 +0000 (11:17 -0500)] 
Merge remote-tracking branch 'teor/bug23470-029' into maint-0.2.9

8 years agoMerge branch 'maint-0.2.9' into maint-0.3.0
Nick Mathewson [Mon, 13 Nov 2017 16:15:50 +0000 (11:15 -0500)] 
Merge branch 'maint-0.2.9' into maint-0.3.0

8 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Mon, 13 Nov 2017 16:15:50 +0000 (11:15 -0500)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

8 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Mon, 13 Nov 2017 16:15:50 +0000 (11:15 -0500)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

8 years agoMerge branch 'bug8185_025' into maint-0.2.9
Nick Mathewson [Mon, 13 Nov 2017 16:15:47 +0000 (11:15 -0500)] 
Merge branch 'bug8185_025' into maint-0.2.9

8 years agoMerge branch 'bug8185_031' into maint-0.3.1
Nick Mathewson [Mon, 13 Nov 2017 16:15:40 +0000 (11:15 -0500)] 
Merge branch 'bug8185_031' into maint-0.3.1

8 years agoMerge branch 'maint-0.2.9' into maint-0.3.0
Nick Mathewson [Mon, 13 Nov 2017 16:13:22 +0000 (11:13 -0500)] 
Merge branch 'maint-0.2.9' into maint-0.3.0

8 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Mon, 13 Nov 2017 16:13:22 +0000 (11:13 -0500)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

8 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Mon, 13 Nov 2017 16:13:22 +0000 (11:13 -0500)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

8 years agoMerge branch 'ticket21953_029' into maint-0.2.9
Nick Mathewson [Mon, 13 Nov 2017 16:13:18 +0000 (11:13 -0500)] 
Merge branch 'ticket21953_029' into maint-0.2.9

8 years agoFix mock_crypto_pk_public_checksig__nocheck() to handle short RSA keys
Nick Mathewson [Sat, 11 Nov 2017 19:42:39 +0000 (14:42 -0500)] 
Fix mock_crypto_pk_public_checksig__nocheck() to handle short RSA keys

This function -- a mock replacement used only for fuzzing -- would
have a buffer overflow if it got an RSA key whose modulus was under
20 bytes long.

Fortunately, Tor itself does not appear to have a bug here.

Fixes bug 24247; bugfix on 0.3.0.3-alpha when fuzzing was
introduced.  Found by OSS-Fuzz; this is OSS-Fuzz issue 4177.

8 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Sat, 11 Nov 2017 17:23:34 +0000 (12:23 -0500)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

8 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Sat, 11 Nov 2017 17:23:34 +0000 (12:23 -0500)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

8 years agoMerge branch 'maint-0.2.5' into maint-0.2.8
Nick Mathewson [Sat, 11 Nov 2017 17:23:33 +0000 (12:23 -0500)] 
Merge branch 'maint-0.2.5' into maint-0.2.8

8 years agoMerge branch 'maint-0.2.9' into maint-0.3.0
Nick Mathewson [Sat, 11 Nov 2017 17:23:33 +0000 (12:23 -0500)] 
Merge branch 'maint-0.2.9' into maint-0.3.0

8 years agoMerge branch 'maint-0.2.8' into maint-0.2.9
Nick Mathewson [Sat, 11 Nov 2017 17:23:33 +0000 (12:23 -0500)] 
Merge branch 'maint-0.2.8' into maint-0.2.9

8 years agocontrol: Fix wrong Action on failure to upload an HS descriptor
David Goulet [Fri, 10 Nov 2017 20:31:31 +0000 (15:31 -0500)] 
control: Fix wrong Action on failure to upload an HS descriptor

On failure to upload, the HS_DESC event would report "UPLOAD_FAILED" as the
Action but it should have reported "FAILED" according to the spec.

Fixes #24230

Signed-off-by: David Goulet <dgoulet@torproject.org>
8 years agoUpdate geoip and geoip6 to the November 6 2017 database.
Karsten Loesing [Fri, 10 Nov 2017 09:14:09 +0000 (10:14 +0100)] 
Update geoip and geoip6 to the November 6 2017 database.

8 years agoMerge branch 'bug23985_029' into maint-0.3.2
Nick Mathewson [Thu, 9 Nov 2017 13:15:46 +0000 (08:15 -0500)] 
Merge branch 'bug23985_029' into maint-0.3.2

8 years agoRe-remove AllowDotExit deprecation.
Nick Mathewson [Thu, 9 Nov 2017 12:58:27 +0000 (07:58 -0500)] 
Re-remove AllowDotExit deprecation.

This was accidentally reintroduced in 5a46074e55.  It should be
harmless, though: the option is obsolete, so calling it deprecated
is redundant.

8 years agobump to 0.3.2.4-alpha-dev
Nick Mathewson [Wed, 8 Nov 2017 21:44:53 +0000 (16:44 -0500)] 
bump to 0.3.2.4-alpha-dev

8 years agoMerge remote-tracking branch 'dgoulet/bug24186_032_01' into maint-0.3.2
Nick Mathewson [Wed, 8 Nov 2017 19:49:16 +0000 (14:49 -0500)] 
Merge remote-tracking branch 'dgoulet/bug24186_032_01' into maint-0.3.2

8 years agodirauth: Recalculate voting schedule at first vote
David Goulet [Wed, 8 Nov 2017 19:36:04 +0000 (14:36 -0500)] 
dirauth: Recalculate voting schedule at first vote

Commit e67f4441eb2646368e3e7cb1bcee403667b786f0 introduced a safeguard against
using an uninitialized voting schedule object. However, the dirvote_act() code
was looking roughly at the same thing to know if it had to compute the timings
before voting with this condition:

  if (!voting_schedule.voting_starts) {
    ...
    dirvote_recalculate_timing(options, now);
  }

The sr_init() function is called very early and goes through the safeguard
thus the voting schedule is always initilized before the first vote.

That first vote is a crucial one because we need to have our voting schedule
aligned to the "now" time we are about to use for voting. Then, the schedule
is updated when we publish our consensus or/and when we set a new consensus.
From that point on, we only want to update the voting schedule through that
code flow.

This "created_on_demand" is indicating that the timings have been recalculated
on demand by another subsystem so if it is flagged, we know that we need to
ignore its values before voting.

Fixes #24186

Signed-off-by: David Goulet <dgoulet@torproject.org>
8 years agoMerge remote-tracking branch 'dgoulet/ticket24134_032_01' into maint-0.3.2
Nick Mathewson [Wed, 8 Nov 2017 18:26:46 +0000 (13:26 -0500)] 
Merge remote-tracking branch 'dgoulet/ticket24134_032_01' into maint-0.3.2

8 years agoDon't delay descriptor fetches when missing info needed for circuits
Nick Mathewson [Wed, 8 Nov 2017 18:22:16 +0000 (13:22 -0500)] 
Don't delay descriptor fetches when missing info needed for circuits

When we have fewer than 15 descriptors to fetch, we will delay the
fetch for a little while.  That's fine, if we can go ahead and build
circuits... but if not, it's a poor choice indeed.

Fixes bug 23985; bugfix on 0.1.1.11-alpha.

In 0.3.0.3-alpha, when we made primary guard descriptors necessary
for circuit building, this situation got worse.

8 years agodowngrade severity for get_voting_schedule()
Nick Mathewson [Wed, 8 Nov 2017 16:50:57 +0000 (11:50 -0500)] 
downgrade severity for get_voting_schedule()

8 years agoMerge remote-tracking branch 'dgoulet/bug23751_032_01' into maint-0.3.2
Nick Mathewson [Wed, 8 Nov 2017 15:56:33 +0000 (10:56 -0500)] 
Merge remote-tracking branch 'dgoulet/bug23751_032_01' into maint-0.3.2

8 years agoMerge branch 'bug23318-redux_029' into maint-0.3.2
Nick Mathewson [Wed, 8 Nov 2017 15:47:22 +0000 (10:47 -0500)] 
Merge branch 'bug23318-redux_029' into maint-0.3.2

8 years agoStop calculating total twice in frac_nodes_with_descriptors()
teor [Wed, 8 Nov 2017 03:18:46 +0000 (14:18 +1100)] 
Stop calculating total twice in frac_nodes_with_descriptors()

Cleanup after 23318.

8 years agoCheck arguments and initialise variables in compute_weighted_bandwidths()
teor [Wed, 8 Nov 2017 03:17:37 +0000 (14:17 +1100)] 
Check arguments and initialise variables in compute_weighted_bandwidths()

Cleanup after 23318.

8 years agoActually log the total bandwidth in compute_weighted_bandwidths()
teor [Wed, 8 Nov 2017 03:17:03 +0000 (14:17 +1100)] 
Actually log the total bandwidth in compute_weighted_bandwidths()

Fixes bug 24170; bugfix on 0.2.4.3-alpha.

8 years agoUse node counts in networks with all zero-bandwidths
teor [Wed, 8 Nov 2017 03:09:50 +0000 (14:09 +1100)] 
Use node counts in networks with all zero-bandwidths

When calculating the fraction of nodes that have descriptors, and all
all nodes in the network have zero bandwidths, count the number of nodes
instead.

Fixes bug 23318; bugfix on 0.2.4.10-alpha.

8 years agoRemove an erroneous 0.5 in compute_weighted_bandwidths()
Nick Mathewson [Fri, 22 Sep 2017 19:29:15 +0000 (15:29 -0400)] 
Remove an erroneous 0.5 in compute_weighted_bandwidths()

Back in 0.2.4.3-alpha (e106812a778f537), when we switched from using
double to using uint64 for selecting by bandwidth, I got the math
wrong: I should have used llround(x), or (uint64_t)(x+0.5), but
instead I wrote llround(x+0.5).  That means we would always round
up, rather than rounding to the closest integer

Fixes bug 23318; bugfix on 0.2.4.3-alpha.

8 years agodoc: Put the release timeline link in README
David Goulet [Wed, 8 Nov 2017 15:44:00 +0000 (10:44 -0500)] 
doc: Put the release timeline link in README

Closes #24134

Signed-off-by: David Goulet <dgoulet@torproject.org>
8 years agosched: Ignore closed channel after flushing cells
David Goulet [Wed, 8 Nov 2017 14:44:39 +0000 (09:44 -0500)] 
sched: Ignore closed channel after flushing cells

The flush cells process can close a channel if the connection write fails but
still return that it flushed at least one cell. This is due because the error
is not propagated up the call stack so there is no way of knowing if the flush
actually was successful or not.

Because this would require an important refactoring touching multiple
subsystems, this patch is a bandaid to avoid the KIST scheduler to handle
closed channel in its loop.

Bandaid on #23751.

Signed-off-by: David Goulet <dgoulet@torproject.org>
8 years agoMerge branch 'bug23816_029_squashed' into maint-0.3.2
Nick Mathewson [Wed, 8 Nov 2017 13:11:22 +0000 (08:11 -0500)] 
Merge branch 'bug23816_029_squashed' into maint-0.3.2

8 years agoReplace our random-exponential-delay algorithm.
Nick Mathewson [Tue, 17 Oct 2017 17:24:40 +0000 (13:24 -0400)] 
Replace our random-exponential-delay algorithm.

This patch has implementations of the "decorrelated" and "full"
algorithms from https://www.awsarchitectureblog.com/2015/03/backoff.html

8 years agoRevert "Remove an erroneous 0.5 in compute_weighted_bandwidths()"
Nick Mathewson [Wed, 8 Nov 2017 01:35:19 +0000 (20:35 -0500)] 
Revert "Remove an erroneous 0.5 in compute_weighted_bandwidths()"

This reverts commit 01e984870a7e1db2722e85fe43af7bcb4755c2d4.

8 years agoMerge remote-tracking branch 'dgoulet/bug24161_032_01' into maint-0.3.2
Nick Mathewson [Tue, 7 Nov 2017 19:00:18 +0000 (14:00 -0500)] 
Merge remote-tracking branch 'dgoulet/bug24161_032_01' into maint-0.3.2

8 years agoBump to 0.3.2.4-alpha
Nick Mathewson [Tue, 7 Nov 2017 18:22:27 +0000 (13:22 -0500)] 
Bump to 0.3.2.4-alpha

8 years agoAdd a safe guard to avoid using a zeroed voting schedule
David Goulet [Tue, 7 Nov 2017 16:14:45 +0000 (11:14 -0500)] 
Add a safe guard to avoid using a zeroed voting schedule

dirvote_get_next_valid_after_time() is the only public function that uses the
voting schedule outside of the dirvote subsystem so if it is zeroed,
recalculate its timing if we can that is if a consensus exists.

Part of #24161

Signed-off-by: David Goulet <dgoulet@torproject.org>
8 years agoRecalculate voting schedule first when getting a new consensus
David Goulet [Tue, 7 Nov 2017 16:08:12 +0000 (11:08 -0500)] 
Recalculate voting schedule first when getting a new consensus

Because the HS and SR subsystems can use the voting schedule early (with the
changes in #23623 making the SR subsystem using the static voting schedule
object), we need to recalculate the schedule very early when setting the new
consensus.

Fixes #24161

Signed-off-by: David Goulet <dgoulet@torproject.org>
8 years agoMerge remote-tracking branch 'asn/ticket23623_032_01' into maint-0.3.2
Nick Mathewson [Tue, 7 Nov 2017 14:58:42 +0000 (09:58 -0500)] 
Merge remote-tracking branch 'asn/ticket23623_032_01' into maint-0.3.2

8 years agoAdd changes file for #23623.
George Kadianakis [Mon, 6 Nov 2017 22:28:14 +0000 (00:28 +0200)] 
Add changes file for #23623.

8 years agoMerge branch 'bug24150_032_squashed' into maint-0.3.2
Nick Mathewson [Mon, 6 Nov 2017 17:59:23 +0000 (12:59 -0500)] 
Merge branch 'bug24150_032_squashed' into maint-0.3.2

8 years agoFix a memory leak on decryption non-failure of v3 hsdesc
Nick Mathewson [Sun, 5 Nov 2017 17:21:16 +0000 (12:21 -0500)] 
Fix a memory leak on decryption non-failure of v3 hsdesc

If it decrypts something that turns out to start with a NUL byte,
then decrypt_desc_layer() will return 0 to indicate the length of
its result.  But 0 also indicates an error, which causes the result
not to be freed by decrypt_desc_layer()'s callers.

Since we're trying to stabilize 0.3.2.x, I've opted for the simpler
possible fix here and made it so that an empty decrypted string will
also count as an error.

Fixes bug 24150 and OSS-Fuzz issue 3994.

The original bug was present but unreachable in 0.3.1.1-alpha. I'm
calling this a bugfix on 0.3.2.1-alpha since that's the first version
where you could actually try to decrypt these descriptors.

8 years agoFix a 32-bit formatting warning
Nick Mathewson [Mon, 6 Nov 2017 15:16:10 +0000 (10:16 -0500)] 
Fix a 32-bit formatting warning

8 years agoMerge remote-tracking branch 'public/bug23318_029' into maint-0.3.2
Nick Mathewson [Mon, 6 Nov 2017 14:48:51 +0000 (09:48 -0500)] 
Merge remote-tracking branch 'public/bug23318_029' into maint-0.3.2

8 years agolintchanges: Allow 'fixes bugs a, b, and c'
Nick Mathewson [Sun, 5 Nov 2017 19:41:39 +0000 (14:41 -0500)] 
lintchanges: Allow 'fixes bugs a, b, and c'

8 years agoMerge branch 'bug21394_029' into maint-0.3.2
Nick Mathewson [Sun, 5 Nov 2017 19:39:37 +0000 (14:39 -0500)] 
Merge branch 'bug21394_029' into maint-0.3.2

8 years agoFix DNS resolution on busy exit relays
Sebastian Hahn [Fri, 3 Nov 2017 02:06:12 +0000 (03:06 +0100)] 
Fix DNS resolution on busy exit relays

Thanks to Dhalgren who analyzed this issue two years ago and found a
solution!

8 years agoticket21031 changes file revised.
Nick Mathewson [Sun, 5 Nov 2017 19:09:07 +0000 (14:09 -0500)] 
ticket21031 changes file revised.

8 years agoClientDNSRejectInternalAddresses in non-default networks
Sebastian Hahn [Sat, 4 Nov 2017 15:37:41 +0000 (16:37 +0100)] 
ClientDNSRejectInternalAddresses in non-default networks

Once again allow the flag to be set, unless the default network is used.
Thanks to nickm for a suggestion for the workaround to a test failure.

8 years agoUndo deprecation of ClientDNSRejectInternalAddresses
Sebastian Hahn [Sat, 4 Nov 2017 15:24:52 +0000 (16:24 +0100)] 
Undo deprecation of ClientDNSRejectInternalAddresses

8 years agoRevert "Make ClientDNSRejectInternalAddresses testing-only."
Sebastian Hahn [Fri, 3 Nov 2017 22:00:27 +0000 (23:00 +0100)] 
Revert "Make ClientDNSRejectInternalAddresses testing-only."

This reverts commit 27fa4a98d23972213122fa99499efa4baebe49e3.

8 years agonodelist: Downgrade warning to protocol warning
David Goulet [Wed, 1 Nov 2017 16:15:15 +0000 (12:15 -0400)] 
nodelist: Downgrade warning to protocol warning

The node_get_ed25519_id() warning can actually be triggered by a relay flagged
with NoEdConsensus so instead of triggering a warning on all relays of the
network, downgrade it to protocol warning.

Fixes #24025

Signed-off-by: David Goulet <dgoulet@torproject.org>
8 years agoMerge branch 'dgoulet_ticket23753_032_02_squashed' into maint-0.3.2
Nick Mathewson [Thu, 2 Nov 2017 14:30:42 +0000 (10:30 -0400)] 
Merge branch 'dgoulet_ticket23753_032_02_squashed' into maint-0.3.2