Commit Graph

35804 Commits

Author SHA1 Message Date
Nick Mathewson
2e98e88117 Merge branch 'maint-0.4.4' 2020-07-02 10:15:04 -04:00
Nick Mathewson
18fa53fdf4 Merge branch 'ticket32622_044_squashed' into maint-0.4.4 2020-07-02 10:14:55 -04:00
Nick Mathewson
65b05b12ab Changes file for #32622. 2020-07-02 10:14:48 -04:00
Nick Mathewson
7b5f58a1c9 Carry TLS error strings forward to controller when reporting them.
Now instead of saying "DONE, DONE" or "MISC, MISC" or "TLS_ERROR,
TLS_ERROR",  we can finally give a nice sensible "TLS_ERROR,
wrong version number" which should help debug a great deal.

Closes ticket 32622.
2020-07-02 10:14:48 -04:00
Nick Mathewson
20d1a1cdbd Merge remote-tracking branch 'dgoulet/ticket32822_045_01' 2020-07-02 09:47:43 -04:00
David Goulet
8da10e8237 Merge branch 'maint-0.4.3' into maint-0.4.4 2020-07-02 07:20:58 -04:00
David Goulet
9b560ea714 Merge branch 'maint-0.4.4' 2020-07-02 07:20:58 -04:00
David Goulet
5a5ff3d8c5 Merge branch 'maint-0.4.2' into maint-0.4.3 2020-07-02 07:20:57 -04:00
David Goulet
07d8d398ca Merge branch 'maint-0.3.5' into maint-0.4.2 2020-07-02 07:20:57 -04:00
teor
82010b0e2e parseconf: Add an authority IPv6 ORPort test
These tests don't actually exercise the authority IPv6 ORPort
self-add feature in 32822, but they do improve coverage of the
related config code.

Part of 32822.
2020-07-02 07:09:02 -04:00
teor
1f58b0ca26 router: Authorities add their own IPv6 to trusted dir servers
Authorities currently add themselves to the trusted dir servers list,
but if they have an IPv6 ORPort, they leave it out.

This commit makes authorities add their own IPv6 ORPort to the trusted
dir servers list.

Closes ticket 32822.
2020-07-02 07:09:02 -04:00
Nick Mathewson
538b25241e Merge remote-tracking branch 'dgoulet/ticket33235_045_01' 2020-07-01 16:27:12 -04:00
David Goulet
f152d5b15f test: Rename test_rep_hist to test_stats
The exposed interface is "stats/" thus make the unit tests clear that it is
testing that specific GETINFO command.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-01 12:31:40 -04:00
David Goulet
f30f53e099 Merge branch 'tor-github/pr/1907' 2020-07-01 12:26:19 -04:00
Neel Chauhan
b558971c07 Add changes file for Ticket #28279 2020-07-01 12:00:53 -04:00
Neel Chauhan
4173876bc4 Add GETINFO "rephist/{tap,ntor}/onion_handshakes_{assigned/requested}" test 2020-07-01 12:00:53 -04:00
Neel Chauhan
4477317cbe control: Add a key to GETINFO to fetch the circuit onion handshake rephist values 2020-07-01 12:00:53 -04:00
Nick Mathewson
368156fcb7 Merge branch 'ticket34137' 2020-07-01 10:34:39 -04:00
Nick Mathewson
5d956d797b Add a comment explaining reachability vs bandwidth self-tests
This is in response to a question about why we don't always log
orport self-tests as reachability tests.

I'm not 100% convinced that bandwidth self-tests are still useful,
but that's an issue for another day. :)
2020-07-01 10:33:27 -04:00
David Goulet
b039d3e803 Merge branch 'tor-github/pr/1953' 2020-07-01 09:47:26 -04:00
George Kadianakis
0d02c053f8 Merge branch 'maint-0.4.3' into maint-0.4.4 2020-07-01 12:55:03 +03:00
George Kadianakis
7f999203ce Merge branch 'maint-0.4.4' 2020-07-01 12:55:03 +03:00
George Kadianakis
1932a84ef5 Merge branch 'maint-0.4.2' into maint-0.4.3 2020-07-01 12:55:02 +03:00
George Kadianakis
38208185be Merge branch 'maint-0.3.5' into maint-0.4.2 2020-07-01 12:55:02 +03:00
George Kadianakis
9beae02713 Merge branch 'tor-github/pr/1766' into maint-0.3.5 2020-07-01 12:54:29 +03:00
Nick Mathewson
8f59b3e6f2 resolve_addr.c: remove a needless quote mark 2020-06-30 14:36:11 -04:00
Nick Mathewson
8dd9097bdc Merge remote-tracking branch 'dgoulet/ticket40009_045_01' 2020-06-30 14:35:25 -04:00
David Goulet
ec57cbf179 addr: Document better is_local_addr_to_resolve_addr()
This function is about learning if a given address is local to us as in the
resolved address as a relay.

Closes #40009

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-06-30 13:50:01 -04:00
David Goulet
2ac2ba4e2c node: Rename addrs_in_same_network_family()
New name reflects that the function is only used to compare router addresses
in order to learn if they are in the same network.

The network check is /16 and /32 respectively for IPv4 and IPv6.

Related to #40009

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-06-30 13:48:22 -04:00
David Goulet
7a6e1f2491 scripts: Fix rename_c_identifier.py uncommitted warning
Only warn when we actually want a commit _and_ there are uncommitted changes
found. Else, it is fine to rename if the script is not creating a commit.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-06-30 13:48:22 -04:00
David Goulet
b14b1f2b1d addr: Don't guess our address if no Address lines are valid
If at least one Address line is given but invalid, we should not attempt to
guess our address.

This commit sends back the "bail" signal so find_my_address() can return an
error if the requested family doesn't exists but still an Address line is
found which is likely another family.

Fixed in #33235
Related to #33233

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-06-30 12:13:23 -04:00
David Goulet
6f1423cb57 addr: Continue trying all Address options on resolve failure
When going over all Address lines from the configuration, continue to attempt
resolving other lines if one fails.

Before that, we would bail right away and never noticed the other Address
lines.

Fixed in #33235
Related to #33233

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-06-30 12:12:04 -04:00
David Goulet
a8b8a1ee99 addr: Only attempt Address resolution on non parsable lines
In get_address_from_config(), we would attempt to resolve an Address line that
is not from the requested family but that line could be a valid address from
another family (v4 vs v6).

This makes it that we don't attempt to resolve a valid address from another
family.

Found with unit test config/find_my_address_mixed.

Fixed in #33235
Related to #33233

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-06-30 12:05:56 -04:00
David Goulet
89c26f4cfd test: Mixed unit tests for find_my_address()
This unit tests validates the use of IPv4 _and_ IPv6 together as in multiple
option Address lines both addresses and hostnames.

Closes #33235

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-06-30 12:04:18 -04:00
Nick Mathewson
39830b6408 Downgrade "Bug: No entry found in extrainfo map" message.
This is not actually a bug!  It can happen for a bunch of reasons,
which all boil down to "trying to add an extrainfo for which we no
longer have the corresponding routerinfo".

Fixes #16016; bugfix on 0.2.6.3-alpha.
2020-06-30 11:54:13 -04:00
Nick Mathewson
2238b6320b Refactor reachability test logging: log exactly what we launch.
Previously we had two chains of logic for reachability tests: one
for launching them, and one for telling the user that we had
launched them.  Now, we simply have the launch code inform the user:
this way, we can't get out of sync.

Closes ticket 34137.
2020-06-30 11:12:46 -04:00
Alexander Færøy
322abd4fd9 Merge branch 'maint-0.4.2' into maint-0.4.3 2020-06-30 14:23:41 +00:00
Alexander Færøy
dbb70d85bf Merge branch 'maint-0.3.5' into maint-0.4.2 2020-06-30 14:23:41 +00:00
Alexander Færøy
9638c6d7a7 Merge branch 'maint-0.4.3' into maint-0.4.4 2020-06-30 14:23:41 +00:00
Alexander Færøy
081d84c1de Merge branch 'maint-0.4.4' 2020-06-30 14:23:41 +00:00
Alexander Færøy
8697205be4 Merge branch 'tor-github/pr/1909' into maint-0.3.5 2020-06-30 14:23:17 +00:00
David Goulet
fe6b049651 test: Unit tests for find_my_address() IPv6
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-06-30 10:22:01 -04:00
Alexander Færøy
0d5152fc53 Merge branch 'maint-0.4.3' into maint-0.4.4 2020-06-30 14:19:44 +00:00
Alexander Færøy
90c313e87c Merge branch 'maint-0.4.4' 2020-06-30 14:19:44 +00:00
Alexander Færøy
5a38c73f70 Merge branch 'tor-github/pr/1887' into maint-0.4.3 2020-06-30 14:19:28 +00:00
Alexander Færøy
bb5745d656 Merge branch 'maint-0.4.3' into maint-0.4.4 2020-06-30 14:16:16 +00:00
Alexander Færøy
8f2571b233 Merge branch 'maint-0.4.4' 2020-06-30 14:16:16 +00:00
Alexander Færøy
fb46d1bb34 Merge branch 'maint-0.4.2' into maint-0.4.3 2020-06-30 14:16:16 +00:00
Alexander Færøy
881f50a9a9 Merge branch 'tor-github/pr/1806' into maint-0.4.2 2020-06-30 14:15:57 +00:00
Alexander Færøy
572cf774b9 Merge branch 'maint-0.4.3' into maint-0.4.4 2020-06-30 14:03:04 +00:00