Commit Graph

35751 Commits

Author SHA1 Message Date
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
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
David Goulet
faba6909f8 test: Rename function to be IPv4 specific
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-06-30 09:56:14 -04:00
Alexander Færøy
be7386a654 Merge branch 'maint-0.4.4' 2020-06-30 13:48:49 +00:00
Alexander Færøy
aced9be224 Merge branch 'maint-0.4.3' into maint-0.4.4 2020-06-30 13:48:49 +00:00
Alexander Færøy
2042ebe88e Merge branch 'maint-0.4.2' into maint-0.4.3 2020-06-30 13:48:49 +00:00
Alexander Færøy
483082b57b Merge branch 'maint-0.3.5' into maint-0.4.2 2020-06-30 13:48:49 +00:00
Alexander Færøy
c3ad2a1d23 Merge branch 'tor-github/pr/1785' into maint-0.3.5 2020-06-30 13:47:55 +00:00
Alexander Færøy
9e4b47233b Merge branch 'maint-0.4.4' 2020-06-30 13:37:20 +00:00
Alexander Færøy
21cf91ee2c Merge branch 'maint-0.4.3' into maint-0.4.4 2020-06-30 13:37:20 +00:00
Alexander Færøy
c57896a76e Merge branch 'maint-0.4.2' into maint-0.4.3 2020-06-30 13:37:20 +00:00
Alexander Færøy
b0bfee8c78 Merge branch 'maint-0.3.5' into maint-0.4.2 2020-06-30 13:37:20 +00:00
Alexander Færøy
bebdd2888f Merge remote-tracking branch 'nickm-github/bug32884_035' into maint-0.3.5 2020-06-30 13:35:13 +00:00
Alexander Færøy
96876d3ad7 Merge branch 'tor-github/pr/1940' 2020-06-30 01:22:44 +00:00
Nick Mathewson
feddba6f8b Merge branch 'maint-0.4.3' into maint-0.4.4 2020-06-29 13:57:50 -04:00
Nick Mathewson
86aa84e634 Merge branch 'maint-0.4.4' 2020-06-29 13:57:50 -04:00
Nick Mathewson
eef77227ef Merge branch 'maint-0.4.2' into maint-0.4.3 2020-06-29 13:57:41 -04:00
Nick Mathewson
d235e523d5 Merge branch 'ticket33290_v2_042' into maint-0.4.2 2020-06-29 13:57:13 -04:00
Nick Mathewson
b2ce815bd8 Merge branch 'maint-0.4.3' into maint-0.4.4 2020-06-29 13:56:16 -04:00
Nick Mathewson
5b47a58d16 Merge branch 'maint-0.4.4' 2020-06-29 13:56:16 -04:00
Nick Mathewson
d124cfc058 Merge branch 'maint-0.4.2' into maint-0.4.3 2020-06-29 13:56:04 -04:00
Nick Mathewson
a692b87f82 Merge remote-tracking branch 'tor-github/pr/1696/head' into maint-0.4.2 2020-06-29 13:53:27 -04:00
Nick Mathewson
9e85515f83 Merge branch 'maint-0.4.3' into maint-0.4.4 2020-06-29 13:48:32 -04:00
Nick Mathewson
def7844c4f Merge branch 'maint-0.4.4' 2020-06-29 13:48:32 -04:00
Nick Mathewson
31bdfd4920 Merge branch 'maint-0.4.2' into maint-0.4.3 2020-06-29 13:48:32 -04:00
Nick Mathewson
0575a182a6 Merge remote-tracking branch 'tor-github/pr/1697/head' into maint-0.4.2 2020-06-29 13:48:25 -04:00
Nick Mathewson
6fb31bb34a Merge branch 'maint-0.4.3' into maint-0.4.4 2020-06-29 12:58:50 -04:00
Nick Mathewson
6b71cc64cf Merge branch 'maint-0.4.4' 2020-06-29 12:58:50 -04:00
Nick Mathewson
f862971d04 Merge branch 'maint-0.4.2' into maint-0.4.3 2020-06-29 12:58:50 -04:00
Nick Mathewson
216456299f Merge remote-tracking branch 'tor-github/pr/1722/head' into maint-0.4.2 2020-06-29 12:58:23 -04:00
Nick Mathewson
41a4243901 Merge branch 'maint-0.4.3' into maint-0.4.4 2020-06-29 12:56:50 -04:00
Nick Mathewson
ea3a25ff51 Merge branch 'maint-0.4.4' 2020-06-29 12:56:50 -04:00
Nick Mathewson
3008255aea Merge remote-tracking branch 'tor-github/pr/1829/head' into maint-0.4.3 2020-06-29 12:56:39 -04:00
Nick Mathewson
fd8ce812b0 Merge branch 'maint-0.3.5' into maint-0.4.2 2020-06-29 12:55:35 -04:00
Nick Mathewson
2c61f22e43 Merge branch 'maint-0.4.3' into maint-0.4.4 2020-06-29 12:55:35 -04:00
Nick Mathewson
c2843f9fe4 Merge branch 'maint-0.4.4' 2020-06-29 12:55:35 -04:00
Nick Mathewson
183d0d30d6 Merge branch 'maint-0.4.2' into maint-0.4.3 2020-06-29 12:55:35 -04:00
Nick Mathewson
0c0214bcc0 Merge remote-tracking branch 'tor-github/pr/1725/head' into maint-0.3.5 2020-06-29 12:55:27 -04:00
Alexander Færøy
f1932265fc Merge branch 'dgoulet/tor-ticket40008_045_01' 2020-06-29 14:09:53 +00:00
Nick Mathewson
5336ac2669 Move remaining CodeStructure.md contents into doxygen. 2020-06-26 10:11:42 -04:00
Nick Mathewson
e269e081a1 Remove changes files that appeared in tor 0.4.4.1-alpha. 2020-06-26 09:50:57 -04:00
Nick Mathewson
dbc2b75009 Merge branch 'assume_reachable_revamp' 2020-06-26 08:34:56 -04:00
Nick Mathewson
cb25f57724 Remove stub macro for router_new_consensus_params()
I had incorrectly believed that the router.c file was disabled when
we were building with relay mode disabled.
2020-06-26 08:32:33 -04:00
David Goulet
40922629fe addr: Look at /48 for IPv6 in is_local_addr()
Closes #33618

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-06-25 13:45:05 -04:00
David Goulet
069566b40a Merge branch 'tor-github/pr/1951' 2020-06-25 13:41:45 -04:00
David Goulet
374626c09b Merge branch 'tor-github/pr/1917' 2020-06-25 13:35:34 -04:00
Neel Chauhan
7b2ab93f65 Add test for fingerprint-ed25519 file 2020-06-25 13:35:15 -04:00