Commit Graph

9486 Commits

Author SHA1 Message Date
Nick Mathewson
9d922b8eaa Merge branch 'maint-0.4.4' 2020-07-23 10:10:32 -04:00
Nick Mathewson
07934664c5 Merge branch 'maint-0.4.3' into maint-0.4.4 2020-07-23 10:09:14 -04:00
Nick Mathewson
6354b70e49 Merge branch 'maint-0.4.2' into maint-0.4.3 2020-07-23 10:09:14 -04:00
Nick Mathewson
3bcbd69a77 Merge branch 'maint-0.3.5' into maint-0.4.2 2020-07-23 10:09:14 -04:00
Nick Mathewson
f916ddd312 More info in the fallbackdir changes file 2020-07-23 10:08:42 -04:00
David Goulet
6f19e67c98 fallbackdir: Update list for 2020
Closes #40061

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-23 10:05:11 -04:00
Nick Mathewson
b3112a6d26 Merge branch 'remove-padding-fix-7869-v2' 2020-07-23 08:26:44 -04:00
Daniel Pinto
8763d96d20 Changes file for #7869 2020-07-23 08:25:22 -04:00
David Goulet
884ccd6996 Merge branch 'maint-0.4.4' 2020-07-22 16:14:19 -04:00
David Goulet
1ee164afc2 Merge branch 'tor-gitlab/mr/77' into maint-0.4.4 2020-07-22 16:14:11 -04:00
Nick Mathewson
faa752f3c9 Adjust the rules for warning about too many connections.
Previously we tolerated up to 1.5 connections for every relay we
were connected to, and didn't warn if we had fewer than 5
connections total.

Now we tolerate up to 1.5 connections per relay, and up to 4
connections per authority, and we don't warn at all when we have
fewer than 25 connections total.

Fixes bug 33880, which seems to have been provoked by our #17592
change in 0.3.5.
2020-07-22 14:45:03 -04:00
David Goulet
c3a0f75796 relay: Automatically Enable an IPv6 ORPort
This commit makes it that if the ORPort is set with a single port, it will
bind to both global listen IPv4 and IPv6 addresses.

To pin an "ORPort <PORT>" to be IPv4 or IPv6, the IPv4Only/IPv6Only flags are
honored thus this will _only_ bind on IPv6 for that port value:

  ORPort 9050 IPv6Only
    Results in: [::]:9050

  ORPort 9051 IPv4Only
    Results in: [0.0.0.0]:9051

Attempting to configure an explicit IPv4 address with IPv6Only flag is an
error and vice versa.

Closes #33246

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-21 15:48:05 -04:00
Nick Mathewson
354eb0c010 Changes file for ticket 40055 2020-07-21 13:02:38 -04:00
Nick Mathewson
e8497bfaa7 Merge remote-tracking branch 'tor-gitlab/mr/64' 2020-07-21 09:33:41 -04:00
Nick Mathewson
7d0e64016e Merge branch 'maint-0.4.4' 2020-07-21 09:29:13 -04:00
Nick Mathewson
5cd85feaa7 Merge remote-tracking branch 'tor-gitlab/mr/68' into maint-0.4.4 2020-07-21 09:29:03 -04:00
Nick Mathewson
2ee33765ae Merge branch 'maint-0.4.4' 2020-07-21 09:24:27 -04:00
Nick Mathewson
95d4bff784 Merge remote-tracking branch 'tor-gitlab/mr/67' into maint-0.4.4 2020-07-21 09:24:15 -04:00
Daniel Pinto
d75e7daaab Fix seccomp sandbox rules for openat #27315
The need for casting negative syscall arguments depends on the
glibc version. This affects the rules for the openat syscall which
uses the constant AT_FDCWD that is defined as a negative number.
This commit adds logic to only apply the cast when necessary, on
glibc versions from 2.27 onwards.
2020-07-20 22:35:05 +01:00
Daniel Pinto
d28bfb2cd5 Fix seccomp sandbox rules for opening directories #40020
Different versions of glibc use either open or openat for the
opendir function. This commit adds logic to use the correct rule
for each glibc version, namely:
- Until 2.14 open is used
- From 2.15 to to 2.21 openat is used
- From 2.22 to 2.26 open is used
- From 2.27 onwards openat is used
2020-07-20 22:30:13 +01:00
Daniel Pinto
c79b4397d3 Fix seccomp sandbox rules for openat #27315
The need for casting negative syscall arguments depends on the
glibc version. This affects the rules for the openat syscall which
uses the constant AT_FDCWD that is defined as a negative number.
This commit adds logic to only apply the cast when necessary, on
glibc versions from 2.27 onwards.
2020-07-20 22:30:00 +01:00
Nick Mathewson
d6570eaf5d Merge remote-tracking branch 'tor-gitlab/mr/59' 2020-07-20 16:37:11 -04:00
Daniel Pinto
29307c0625 Add running glibc version to the log. #40047
Also adds the compiled and running glibc version when using the
--library-versions flag.
2020-07-17 18:45:57 +01:00
Nick Mathewson
7b3bd45cfe or_connection_t: replace real_addr with canonical_orport.
Instead of replacing connection_t.{addr,port} with a canonical
orport, and tracking the truth in real_addr, we now leave
connection_t.addr alone, and put the canonical address in
canonical_orport.

Closes #40042

Closes #33898
2020-07-17 11:42:49 -04:00
Nick Mathewson
ff68aeb492 When choosing an orport from an extendinfo, pick randomly.
(This is not fully general yet: we only pick randomly among
_supported_ addresses, and each extendinfo contains at most one IPv4
address and at most one IPv6 address, no matter what the extend cell
had.)

This change will help dual-stack relays do IPv6 reachability tests,
in theory, by having them sometimes do IPv4 connections and
sometimes do ipv6 connections.

Closes ticket 33220.
2020-07-17 09:15:08 -04:00
David Goulet
f6fc062119 Merge branch 'tor-gitlab/mr/54' 2020-07-16 12:55:26 -04:00
Nick Mathewson
f0204a3c34 Changes file for CONST_TO_*() functions.
Closes #40046.
2020-07-16 12:55:21 -04:00
Alexander Færøy
39b54bf1dd Merge branch 'tor-gitlab/merge-requests/53' 2020-07-16 14:19:18 +00:00
David Goulet
9c653e58b4 doc: Document circuit subsystem tracing events
Create a doc/tracing/ directory to contain a top level README.md which is the
previously named Tracing.md and add the EventsCircuit.md which describes the
circuit subsystem tracing events in depth.

Closes #40036

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-16 14:19:04 +00:00
Nick Mathewson
ae8072e8ff Changes file for 40041.
Closes #40041.
2020-07-16 09:02:10 -04:00
Nick Mathewson
a7226ca06e Merge remote-tracking branch 'tor-gitlab/mr/50' 2020-07-14 14:50:30 -04:00
Alexander Færøy
abe7196c53 Strip '\r' characters when reading text files on Unix.
This patch ensures that we strip "\r" characters on both Windows as well
as Unix when we read text files. This should prevent the issue where
some Tor state files have been moved from a Windows machine, and thus
contains CRLF line ending, to a Unix machine where only \n is needed.

We add a test-case to ensure that we handle this properly on all our
platforms.

See: https://bugs.torproject.org/tpo/core/tor/33781
2020-07-14 17:41:51 +00:00
Alexander Færøy
aba0ff4cb5 Merge remote-tracking branch 'tor-gitlab/merge-requests/48' 2020-07-14 16:07:36 +00:00
Alexander Færøy
1d554e4baf Merge branch 'maint-0.4.4' 2020-07-14 14:48:21 +00:00
Alexander Færøy
07f3345e11 Merge remote-tracking branch 'tor-gitlab/merge-requests/43' into maint-0.4.4 2020-07-14 14:47:48 +00:00
David Goulet
e594195aa2 Merge branch 'tor-gitlab/mr/47' 2020-07-14 10:36:30 -04:00
David Goulet
15860c8846 addr: Use tor_addr_t instead of uint32_t for IPv4
This changes a LOT of code but in the end, behavior is the same.
Unfortunately, many functions had to be changed to accomodate but in majority
of cases, to become simpler.

Functions are also removed specifically those that were there to convert an
IPv4 as a host format to a tor_addr_t. Those are not needed anymore.

The IPv4 address field has been standardized to "ipv4_addr", the ORPort to
"ipv4_orport" (currently IPv6 uses ipv6_orport) and DirPort to "ipv4_dirport".

This is related to Sponsor 55 work that adds IPv6 support for relays and this
work is needed in order to have a common interface between IPv4 and IPv6.

Closes #40043.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-14 10:36:08 -04:00
David Goulet
456be93956 doc: Move manpages into doc/man/
Closes #40044

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-14 09:02:03 -04:00
David Goulet
29a474294c Merge branch 'maint-0.4.4' 2020-07-13 15:04:13 -04:00
David Goulet
515d4f1e93 Merge branch 'maint-0.4.3' into maint-0.4.4 2020-07-13 15:03:34 -04:00
Nick Mathewson
ecb43ce21c Merge branch 'maint-0.4.4' 2020-07-13 10:45:04 -04:00
Nick Mathewson
eb427f309c Changes file for ticket 31812. 2020-07-13 10:44:39 -04:00
MrSquanchee
c84ce716dc Added tests
Added tests for channel_matches_target_addr_for_extend().
Ticket #33919.
2020-07-13 09:46:11 -04:00
Nick Mathewson
0acc3ae879 Remove check-cocci from check-local target.
check-cocci is still a good idea -- perhaps as a cron job?  But
doing it as part of our regular tests has just been confusing,
especially to volunteers who shouldn't have to become coccinelle
experts in order to get their patches through our CI.

Closes #40030.
2020-07-13 09:24:26 -04:00
Nick Mathewson
40eb6b19a3 NSS: Tell NSS that our SSL sockets are nonblocking.
Closes ticket 40035.
2020-07-10 13:14:33 -04:00
David Goulet
063cdb3142 Merge branch 'tor-gitlab/mr/39' 2020-07-10 13:12:22 -04:00
Nick Mathewson
6fb1637255 Merge remote-tracking branch 'tor-gitlab/mr/29' 2020-07-10 12:53:46 -04:00
David Goulet
dfaa0a82ac changes: Add changes file for #32910
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-10 12:12:26 -04:00
Nick Mathewson
fae19df985 Changes file for ipv6 bidi (ticket 33264) 2020-07-10 09:52:35 -04:00
Nick Mathewson
1a4e475d5d Changes file for ticket 33263 2020-07-10 09:25:28 -04:00