Commit Graph

36704 Commits

Author SHA1 Message Date
George Kadianakis
cd1468d56b Merge branch 'maint-0.4.5' 2021-01-13 16:01:41 +02:00
George Kadianakis
c931eae981 Merge branch 'mr/252' into maint-0.4.5 2021-01-13 16:01:11 +02:00
Nick Mathewson
4d6d3b3c05 Remove BUG() when checking TOO_MANY_OUTDATED_DIRSERVERS.
Fixes bug #40234; bugfix on 0.3.2.5-alpha.
2021-01-13 16:00:54 +02:00
George Kadianakis
cc30c09f7c Merge branch 'mr/236' 2021-01-13 15:23:54 +02:00
Nick Mathewson
fb3704b459 New consensus method to find bwweightscale & maxunmeasuredbw correctly.
Our original code for parsing these parameters out of our list of
parameters pre-dated us having the
dirvote_get_intermediate_param_value() function... and it was buggy.
Specifically, it would reject any " ... K=V ..." value
where there were additional unconverted characters after the V, and
use the default value instead,

We haven't run into this yet because we've never voted for
bwweightscale to be anything besides the default 10000, or
maxunmeasuredbw to be anything besides the default 20.

This requires a new consensus method because it is a change in how
consensuses are computed.

Fixes bug 19011; bugfix on 0.2.2.10-alpha.
2021-01-13 15:23:27 +02:00
Nick Mathewson
1949afef98 Copy forward the changelog for 0.4.5.3-rc. 2021-01-12 16:44:14 -05:00
Nick Mathewson
4c049ca5d7 Merge branch 'maint-0.4.5'
"ours" to avoid version bump.
2021-01-12 16:09:48 -05:00
Nick Mathewson
01be7cc535 Bump to 0.4.5.3-rc-dev 2021-01-12 16:08:07 -05:00
George Kadianakis
42e95c8d85 Merge branch 'maint-0.4.5' 2021-01-12 18:05:32 +02:00
David Goulet
9b59ede8d3 Merge branch 'ticket40237_044_01' into ticket40237_045_01 2021-01-12 10:55:21 -05:00
David Goulet
b3652f2104 Merge branch 'ticket40237_043_01' into ticket40237_044_01 2021-01-12 10:54:31 -05:00
David Goulet
0485c7ddba tests: Fix unit tests after merge of #40237 2021-01-12 10:50:01 -05:00
David Goulet
60da5d6222 Merge branch 'ticket40237_035_01' into ticket40237_043_01 2021-01-12 10:46:25 -05:00
David Goulet
04b0263974 hs-v3: Require reasonably live consensus
Some days before this commit, the network experienced a DDoS on the directory
authorities that prevented them to generate a consensus for more than 5 hours
straight.

That in turn entirely disabled onion service v3, client and service side, due
to the subsystem requiring a live consensus to function properly.

We know require a reasonably live consensus which means that the HSv3
subsystem will to its job for using the best consensus tor can find. If the
entire network is using an old consensus, than this should be alright.

If the service happens to use a live consensus while a client is not, it
should still work because the client will use the current SRV it sees which
might be the previous SRV for the service for which it still publish
descriptors for.

If the service is using an old one and somehow can't get a new one while
clients are on a new one, then reachability issues might arise. However, this
is a situation we already have at the moment since the service will simply not
work if it doesn't have a live consensus while a client has one.

Fixes #40237

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-12 09:46:35 -05:00
Nick Mathewson
9c268b66ba Merge branch 'maint-0.4.5' 2021-01-11 14:46:13 -05:00
Nick Mathewson
d1f4741606 Merge branch 'maint-0.4.4' into maint-0.4.5 2021-01-11 14:37:29 -05:00
Nick Mathewson
5a822b462a Merge branch 'maint-0.4.3' into maint-0.4.4 2021-01-11 14:37:29 -05:00
Nick Mathewson
4b39f46a61 Merge branch 'maint-0.3.5' into maint-0.4.3 2021-01-11 14:37:28 -05:00
Nick Mathewson
6c0f15500b Merge branch 'ticket40241_035' into maint-0.3.5 2021-01-11 14:37:14 -05:00
Nick Mathewson
ccdbbae4ec Fix warnings in current debian-hardened CI.
We're getting "fallback annotation annotation in unreachable code"
warnings when we build with ALL_BUGS_ARE_FATAL. This patch fixes
that.

Fixes bug 40241.  Bugfix on 0.3.5.4-alpha.
2021-01-11 14:25:56 -05:00
Nick Mathewson
d31beeef9f Merge branch 'maint-0.4.5'
"ours" to avoid version bump.
2021-01-11 12:48:11 -05:00
Nick Mathewson
edc9fda4f5 Increment version to 0.4.5.3-rc 2021-01-11 12:48:00 -05:00
Roger Dingledine
ee0a27293e fix typos and whitespace 2021-01-10 13:29:50 -05:00
David Goulet
e7da681034 Merge branch 'maint-0.4.5' 2020-12-21 14:55:44 -05:00
David Goulet
aae9a05a01 relay: Log address suggested by directory authorities
If we get an address suggestion from a directory authority and we have no
address configured or discovered, log it at notice level so the operator can
learn what address will be used by Tor.

Fixes #40201

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-12-21 14:41:52 -05:00
Nick Mathewson
43b3880578 Merge branch 'maint-0.4.5' 2020-12-21 13:26:01 -05:00
Nick Mathewson
ad00da663e Merge branch 'mr_240_squashed' into maint-0.4.5 2020-12-21 13:25:52 -05:00
Nick Mathewson
cce7d1edaf Merge branch 'mr_240_squashed' 2020-12-21 13:23:42 -05:00
David Goulet
f4cbcde2da test: Fix memleak in test/load_stats_file
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-12-21 13:18:20 -05:00
Karsten Loesing
5dd6304f36 Fix timestamp parser in new load_stats_file.
The previous parser only considered stats files _starting_ with the
timestamp tag, not stats files having the timestamp tag in a later
position. While this applies to all current stats files, a future
stats file might look differently. Better to fix the function now than
be surprised in another 9 years from now.

This commit also adds a test case for such future stats, and it fixes
stats file paths in newly added unit tests.
2020-12-21 13:18:20 -05:00
David Goulet
c934fced31 relay: Report the entire content of a stats file
It turns out that 9 years ago, we stopped appending data into stats file and
rather overwrite everytime we have new stats (see commit
a6a127c833)

The load_stats_file() function was still thinking that we could have the same
line many times in the file which turns out to be false since 9 years ago.
However, that did not cause problem until IPv6 connection stats came along
which introduced a new line in conn-stats: "ipv6-conn-bi-direct ...".

Before, that file contained a single line starting with the tag
"conn-bi-direct".  That very tag appears also in the IPv6 tag (see above) so
the load_stats_file() function would consider that the IPv6 line as the last
tag to be appeneded to the file and fail to report the line above (for IPv4).
It would actually truncate the IPv6 line and report it (removing the "ipv6-"
part).

In other words, "conn-bi-direct" was not reported and instead
"ipv6-conn-bi-direct" was used without the "ipv6-" part.

This commit refactors the entire function so that now it looks for a
"timestamp tag" to validate and then if everything is fine, returns the entire
content of the file. The refactor simplifies the function, adds logging in
case of failures and modernize it in terms of coding standard.

Unit tests are also added that makes sure the loaded content matches the
entire file if timestamp validation passes.

Fixes #40226

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-12-21 13:18:20 -05:00
Alexander Færøy
db5f7b4250 Merge remote-tracking branch 'tor-gitlab/mr/211' 2020-12-18 14:22:23 +00:00
Alexander Færøy
b645fbdb54 Merge remote-tracking branch 'tor-gitlab/mr/207' 2020-12-18 14:19:24 +00:00
David Goulet
5527aef56f Merge branch 'maint-0.4.5' 2020-12-17 08:25:29 -05:00
David Goulet
d45354d5ea Merge branch 'tor-gitlab/mr/243' into maint-0.4.5 2020-12-17 08:25:18 -05:00
George Kadianakis
d89974c5c6 Fix Keccak undefined behavior on exotic platforms.
Bug reported and diagnosed in:
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=975977

Fixes bug #40210.
2020-12-17 13:49:17 +02:00
Alexander Færøy
0bd4cd8101 Merge remote-tracking branch 'tor-gitlab/mr/230' 2020-12-16 20:55:03 +00:00
Alexander Færøy
66597b9291 Merge branch 'maint-0.4.5' 2020-12-16 20:39:01 +00:00
Alexander Færøy
5a2d01ae57 Merge branch 'tor-gitlab/mr/234' into maint-0.4.5 2020-12-16 20:38:23 +00:00
David Goulet
ee6ad0e592 config: Catch missing Bridge for ClientTransportPlugin
When making sure we have a Bridge line with a ClientTransportPlugin, we
now check in the managed proxy list and so we can catch any missing
ClientTransportPlugin for a Bridge line.

Fixes #40106

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-12-16 20:37:57 +00:00
Alexander Færøy
66b1a9a5c1 Merge branch 'maint-0.4.5' 2020-12-16 20:31:46 +00:00
Alexander Færøy
b83777f7b2 Merge remote-tracking branch 'tor-gitlab/mr/238' into maint-0.4.5 2020-12-16 20:31:10 +00:00
Alexander Færøy
2d68fdc94c Merge branch 'maint-0.4.5' 2020-12-16 20:29:19 +00:00
Alexander Færøy
7998ea2f18 Merge remote-tracking branch 'tor-gitlab/mr/237' into maint-0.4.5 2020-12-16 20:29:03 +00:00
David Goulet
8b2d32435d build: Add "make lsp" command
Generates the compile_commands.json file using the "bear" application so the
ccls server can be more efficient with our code base.

Closes #40227

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-12-16 19:19:12 +02:00
David Goulet
1430d5ff63 Merge branch 'maint-0.4.5' 2020-12-15 11:58:22 -05:00
David Goulet
4a77aa6e82 Merge branch 'tor-gitlab/mr/239' into maint-0.4.5 2020-12-15 11:58:13 -05:00
George Kadianakis
93f2de8523 Merge branch 'maint-0.4.5' 2020-12-15 16:29:01 +02:00
George Kadianakis
c731a4efec Merge remote-tracking branch 'tor-gitlab/mr/205' into maint-0.4.5 2020-12-15 16:28:49 +02:00
George Kadianakis
c05ae61f26 Merge remote-tracking branch 'tor-gitlab/mr/205' 2020-12-15 16:28:04 +02:00