Commit Graph

35028 Commits

Author SHA1 Message Date
teor
14cb337e80 test/protover: Test hard-coded protover sorting
Make sure that the following hard-coded protocol version lists are
sorted:
  * supported protocols
  * recommended relay and client protocols
  * required relay and client protocols

This test currently fails, because the supported protocols are not
sorted.

Tests for 33285.
2020-02-12 22:07:26 +10:00
teor
64bb6e622d dirvote: Reorder required protocol lists
Use a consistent order, because the current order is going to trip
someone up eventually.

Preparation for 33285.
2020-02-12 22:06:11 +10:00
teor
78051c8808 dirvote: Move required protos into private header
Move the recommended and required protocol version lists into the
private section of the dirvote header, and turn them into macros.

Preparation for 33285.
2020-02-12 22:03:19 +10:00
teor
bc493ce0f2
protover: Update a comment about protover parsing
Comment-only change.
2020-02-12 20:59:25 +10:00
teor
99d957696b
scripts/git: Stop running the checked-out git scripts
Stop executing the checked-out pre-commit hook from the pre-push hook.
Instead, execute the copy in the user's git dir.

Fixes bug 33284; bugfix on 0.4.1.1-alpha.
2020-02-12 20:37:21 +10:00
teor
41a9eddf2b
Merge branch 'maint-0.4.3' 2020-02-12 14:15:27 +10:00
teor
e0ea7407a4
Merge remote-tracking branch 'tor-github/pr/1725' into maint-0.4.3 2020-02-12 14:14:11 +10:00
teor
0e00d9369f
Merge branch 'maint-0.4.2' into maint-0.4.3
"ours" merge, because simiar BridgeDistribution fixes have already
been merged to maint-0.4.3. (See 32753.)

The stem changes in 33075 have already been merged to maint-0.4.3,
so this "ours" merge does not affect them.
2020-02-12 14:13:15 +10:00
David Goulet
88489cd290
hs-v3: Remove BUG() that can occur normally
Fixes #28992

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-02-12 14:09:40 +10:00
teor
ff52205362
Merge branch 'maint-0.4.1' into maint-0.4.2 2020-02-12 12:22:04 +10:00
teor
5298113da9
Merge branch 'maint-0.3.5' into maint-0.4.1 2020-02-12 12:21:57 +10:00
Alexander Færøy
b9c7c61ea5
Lowercase the BridgeDistribution value from torrc in descriptors.
This patch ensures that we always lowercase the BridgeDistribution from
torrc in descriptors before submitting it.

See: https://bugs.torproject.org/32753
2020-02-12 12:21:41 +10:00
teor
88723ad169
Merge remote-tracking branch 'tor-github/pr/1689' into maint-0.3.5 2020-02-12 12:18:59 +10:00
George Kadianakis
9892cc3b12 Merge branch 'tor-github/pr/1707' 2020-02-11 18:42:22 +02:00
David Goulet
40a321659a hs-v3: Remove BUG() that can occur normally
Fixes #28992

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-02-11 18:40:55 +02:00
David Goulet
2a524662c3 Merge branch 'tor-github/pr/1717' 2020-02-11 10:52:49 -05:00
Nick Mathewson
7404b6fb71 Update scripts/git/*.sh to know about 043 and not about 040. 2020-02-11 10:52:42 -05:00
David Goulet
f0964628e6 Merge branch 'ticket33029_042_01' into ticket33029_043_03
Conflicts:
	doc/tor.1.txt
	src/app/config/config.c
	src/app/config/or_options_st.h
	src/core/mainloop/connection.h

Between 042 and 043, the dirauth options were modularized so this merge commit
address this by moving the AuthDirRejectUncompressedRequests to the module
along with a series of accessors.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-02-11 10:30:29 -05:00
David Goulet
7b4d9fabef dirauth: Rename function for better clarity
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-02-11 10:15:23 -05:00
David Goulet
33414e5494 test: Add unit test for connection_dir_is_global_write_low()
Part of #33029

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-02-11 10:15:04 -05:00
David Goulet
6d9113d2f6 dirauth: Resume sending 503 directory error code
Authorities were never sending back 503 error code because by design they
should be able to always answer directory requests regardless of bandwidth
capacity.

However, that recently backfired because of a large number of requests from
unknown source using the DirPort that are _not_ getting their 503 code which
overloaded the DirPort leading to the authority to be unable to answer to its
fellow authorities.

This is not a complete solution to the problem but it will help ease off the
load on the authority side by sending back 503 codes *unless* the connection
is from a known relay or an authority.

Fixes #33029

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-02-11 09:58:28 -05:00
David Goulet
735aa208b1 dirauth: Add option AuthDirRejectRequestsUnderLoad
This controls the previous feature added that makes dirauth send back a 503
error code on non relay connections if under bandwidth pressure.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-02-11 09:57:05 -05:00
David Goulet
bd4f4cb5f0 dirlist: Add configured trusted dir to the nodelist address set
The configured, within the torrc or hardcoded, directory authorities addresses
are now added to the nodelist address set.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-02-11 09:35:54 -05:00
David Goulet
4152c349b4 nodelist: Helper to add an address to the nodelist address set
We separate v4 and v6 because we often use an IPv4 address represented with
a uint32_t instead of a tor_addr_t.

This will be used to also add the trusted directory addresses taken from the
configuration.

The trusted directories from the consensus are already added to the address
set from their descriptor.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-02-11 09:35:50 -05:00
David Goulet
872f95ca06 mainloop: Modernize a bit connection_dir_is_global_write_low()
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-02-11 09:35:46 -05:00
David Goulet
c1e0ac63b8 mainloop: Remove unused parameter from connection_dir_is_global_write_low()
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-02-11 09:35:40 -05:00
David Goulet
ee55823a11 mainloop: Rename global_write_bucket_low()
That function is only used to test the global bucket write limit for a
directory connection.

It should _not_ be used for anything else since that function looks to see if
we are a directory authority.

Rename it to something more meaningful. No change in behavior at this commit,
only renaming.

Part of #33029

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-02-11 09:34:55 -05:00
Nick Mathewson
de31c4757b Merge branch 'maint-0.4.2' into maint-0.4.3 2020-02-11 08:53:41 -05:00
Nick Mathewson
80c5c874cc Merge branch 'maint-0.4.3' 2020-02-11 08:53:41 -05:00
Nick Mathewson
00fe214729 Merge branch 'maint-0.4.1' into maint-0.4.2
"ours" merge, since the exceptions.txt file is already fixed in this branch.
2020-02-11 08:53:00 -05:00
Nick Mathewson
0ff3e8f4a0 Remove a redundant practracker exception line in maint-0.4.1
This will our "git push" hook not complain about pushing from
maint-0.4.1.
2020-02-11 08:52:26 -05:00
Nick Mathewson
384a771fcc Merge branch 'ticket32362_squashed' 2020-02-11 08:47:19 -05:00
Neel Chauhan
777d90fa23 Check for leading zeros in tor_inet_aton() 2020-02-11 08:47:13 -05:00
Nick Mathewson
d9a70ba212 Merge remote-tracking branch 'tor-github/pr/1690/head' 2020-02-11 08:45:25 -05:00
Nick Mathewson
48bf3aec25 Merge branch 'maint-0.4.3' 2020-02-11 08:44:39 -05:00
Nick Mathewson
409e1ca3d5 Merge remote-tracking branch 'tor-github/pr/1716/head' into maint-0.4.3 2020-02-11 08:44:18 -05:00
Nick Mathewson
1ca6c52209 Merge branch 'maint-0.4.3' 2020-02-11 08:35:22 -05:00
Christian Clauss
9f7e1ccacb Undefined name: make_key() -> make_rsa_key() 2020-02-11 08:35:11 -05:00
Nick Mathewson
71d96cefc0 Update to 0.4.4.0-alpha-dev 2020-02-10 19:43:54 -05:00
Nick Mathewson
dac185edba Merge branch 'maint-0.4.3'
"ours" merge to avoid version bump.
2020-02-10 19:43:17 -05:00
Nick Mathewson
5d56c1f4b2 Update to 0.4.3.2-alpha-dev 2020-02-10 19:42:31 -05:00
George Kadianakis
901ed35709 Make n_subcredentials a size_t .
Based on David's review.
2020-02-11 02:13:40 +02:00
Taylor Yu
dfa1800c7f changes file for ticket 33213 2020-02-10 14:24:44 -06:00
swati
725b0528e3 Alphabetized Server Options and Directory Server Options 2020-02-11 01:41:43 +05:30
Nick Mathewson
dcbf6611d9 Correction to changelog from dgoulet 2020-02-10 15:02:32 -05:00
Nick Mathewson
2571d8e7fe One more light changelog edit. 2020-02-10 15:01:02 -05:00
Nick Mathewson
f275a9ada7 Light edits on the 0.4.3.2-alpha changelog 2020-02-10 14:40:19 -05:00
Nick Mathewson
a0ca442b79 start on 0.4.3.2-alpha changelog 2020-02-10 14:30:36 -05:00
Nick Mathewson
eb8841cd95 Merge branch 'bug33104_041' 2020-02-10 14:23:13 -05:00
Nick Mathewson
0c90fc37ec Merge branch 'maint-0.4.1' into maint-0.4.2 2020-02-10 14:17:10 -05:00