Commit Graph

10014 Commits

Author SHA1 Message Date
Nick Mathewson
f98dbdb069 Merge branch 'maint-0.4.5' 2021-03-10 15:28:14 -05:00
Nick Mathewson
e8d224dfb1 Merge remote-tracking branch 'tor-gitlab/mr/335' into maint-0.4.5 2021-03-10 15:27:50 -05:00
David Goulet
d382f26914 Merge branch 'tor-gitlab/mr/331' into maint-0.4.5 2021-03-10 10:06:44 -05:00
David Goulet
6fce18916f Merge branch 'tor-gitlab/mr/331' 2021-03-10 10:06:20 -05:00
David Goulet
fc080b4113 Merge branch 'maint-0.4.5' 2021-03-10 10:04:26 -05:00
David Goulet
9f9fed3fd1 vote: Add "stats" line
Closes #40314

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-03-10 09:51:30 -05:00
David Goulet
f93ccb8d24 hs: Remove hamrless BUG() that can happen
When reloading a service, we can re-register a service and thus end up again
in the metrics store initialization code path which is fine. No need to BUG()
anymore.

Fixes #40334

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-03-10 09:12:29 -05:00
Nick Mathewson
05564a8521 Start a changelog for 0.4.6.1-alpha 2021-03-09 11:58:46 -05:00
Nick Mathewson
4f138f2ed2 Remove changes files that are already merged in 0.4.5.x 2021-03-09 11:44:54 -05:00
Nick Mathewson
9409c7f2f5 Don't warn about missing guard state if controller picked first hop
See comments about why this needs a new flag and we can't just use
CIRCUIT_PURPOSE_CONTROLLER.

Fixes #40285; bugfix on 0.3.2.1-alpha.
2021-03-08 13:42:43 -05:00
Nick Mathewson
b599f489ae Fix documentation formatting for VirtualAddrNetworkIPv6
Fixes bug #40256; bugfix on 0.2.9.4-alpha.
2021-03-08 11:17:24 -05:00
Nick Mathewson
690c7be253 Fix parsing bug in linux get_total_system_memory().
Use find_str_at_start_of_line(), not strstr() here: we don't want
to match "MemTotal: " if it appears in the middle of a line.

Fixes #40315; bugfix on 0.2.5.4-alpha.
2021-03-03 14:52:15 -05:00
Alexander Færøy
80b6054bb0 Merge remote-tracking branch 'tor-gitlab/mr/213' 2021-03-03 15:16:20 +00:00
David Goulet
f75baf5ea5 Merge branch 'maint-0.4.5' 2021-02-24 13:55:30 -05:00
David Goulet
6ea7eb58c6 Merge branch 'tor-gitlab/mr/321' into maint-0.4.5 2021-02-24 13:55:21 -05:00
George Kadianakis
830b0f8c62 Merge remote-tracking branch 'tor-gitlab/mr/306' 2021-02-24 12:35:55 +02:00
David Goulet
6edb648aa0 Merge branch 'maint-0.4.5' 2021-02-23 12:28:04 -05:00
David Goulet
97e51dd01b Merge branch 'tor-gitlab/mr/326' into maint-0.4.5 2021-02-23 12:27:59 -05:00
David Goulet
ad4f87ed3f Remove mallinfo() from codebase
Now deprecated in libc >= 2.33

Closes #40309

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-23 12:16:58 -05:00
David Goulet
296a557bfc Remove mallinfo() from codebase
Now deprecated in libc >= 2.33

Closes #40309

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-23 11:02:33 -05:00
David Goulet
39d0f69dfe relay: Avoid a directory early fetch
The directory_fetches_from_authorities() is used to know if a client or relay
should fetch data from an authority early in the boot process.

We had a condition in that function that made a relay trigger that fetch if it
didn't know its address (so we can learn it). However, when this is called,
the address discovery has not been done yet so it would always return true for
a relay.

Furthermore, it would always trigger a log notice that the IPv4 couldn't be
found which was inevitable because the address discovery process has not been
done yet (done when building our first descriptor).

It is also important to point out that starting in 0.4.5.1-alpha, asking an
authority for an address is done during address discovery time using a one-hop
circuit thus independent from the relay deciding to fetch or not documents
from an authority.

Small fix also is to reverse the "IPv(4|6)Only" flag in the notice so that if
we can't find IPv6 it would output to use IPv4Only.

Fixes #40300

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-23 09:49:45 -05:00
Nick Mathewson
bc799a1eaf Merge remote-tracking branch 'tor-gitlab/mr/320' 2021-02-23 09:29:49 -05:00
David Goulet
c96465259a dos: Change the DoS heartbeat line format
Fix a bug introduced in 94b56eaa75 which
overwrite the connection message line.

Furthermore, improve how we generate that line by using a smartlist and change
the format so it is clearer of what is being rejected/detected and, if
applicable, which option is disabled thus yielding no stats.

Closes #40308

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-23 08:54:45 -05:00
Nick Mathewson
100221baac Merge remote-tracking branch 'origin/master' 2021-02-23 08:43:19 -05:00
Nick Mathewson
09614e0c9d Tweak documentation on 40282 2021-02-23 08:42:31 -05:00
Nick Mathewson
4321755de7 Merge branch 'ticket40282_046_01_squashed' 2021-02-23 08:32:58 -05:00
David Goulet
1c45a3df7c changes: Add changes file for #40282
Closes #40282

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-23 08:29:32 -05:00
Alexander Færøy
83ab6adb10 Merge remote-tracking branch 'tor-gitlab/mr/276' 2021-02-22 20:52:44 +00:00
David Goulet
94b56eaa75 dos: New client connect rate detection
This is a new detection type which is that a relay can now control the rate of
client connections from a single address.

The mechanism is pretty simple, if the rate/burst is reached, the address is
marked for a period of time and any connection from that address is denied.

Closes #40253

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-22 15:48:42 -05:00
Nick Mathewson
8907800549 Merge remote-tracking branch 'tor-gitlab/mr/319' 2021-02-22 15:39:30 -05:00
Nick Mathewson
6e3a7c410f Merge branch 'maint-0.4.5' 2021-02-22 15:37:39 -05:00
Nick Mathewson
bc21ed3290 Merge remote-tracking branch 'tor-gitlab/mr/316' into maint-0.4.5 2021-02-22 15:37:31 -05:00
David Goulet
d98c77b78e relay: Reduce streaming compression ratio from HIGH to LOW
Fixes #40301

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-22 14:47:42 -05:00
Alexander Færøy
a4df1e8ea4 Merge branch 'maint-0.4.5' 2021-02-22 19:13:12 +00:00
Alexander Færøy
26c2e843f9 Merge remote-tracking branch 'tor-gitlab/mr/309' into maint-0.4.5 2021-02-22 19:12:53 +00:00
David Goulet
4d7f31b964 relay: Move log notice after suggested address lookup
When trying to find our address to publish, we would log notice if we couldn't
find it from the cache but then we would look at the suggested cache (which
contains the address from the authorities) in which we might actually have the
address.

Thus that log notice was misplaced. Move it down after the suggested address
cache lookup.

Closes #40300

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-22 09:13:54 -05:00
Neel Chauhan
88559aca2d Make dirauths vote the Sybil flag when other flags are zeroed out 2021-02-19 10:44:11 -08:00
Nick Mathewson
ede88c374c Disable the dump_desc() function.
It can be called with strings that should have been
length-delimited, but which in fact are not.  This can cause a
CPU-DoS bug or, in a worse case, a crash.

Since this function isn't essential, the best solution for older
Tors is to just turn it off.

Fixes bug 40286; bugfix on 0.2.2.1-alpha when dump_desc() was
introduced.
2021-02-19 12:31:19 -05:00
George Kadianakis
03c686563b Merge remote-tracking branch 'tor-gitlab/mr/308' into maint-0.4.5 2021-02-19 13:26:33 +02:00
George Kadianakis
cf1f03fe1d Merge remote-tracking branch 'tor-gitlab/mr/308' 2021-02-19 13:25:47 +02:00
Mike Perry
b2f025cb56 Merge branch 'bug40168+34088-035-v3' into bug40168+34088-035-v3-master 2021-02-18 18:17:18 +00:00
Mike Perry
525195a715 Bug 34088: Changes file 2021-02-18 11:21:25 -06:00
Mike Perry
1fadb1bdf1 Bug 40168 changes file 2021-02-18 11:21:25 -06:00
David Goulet
2709828494 Merge branch 'tor-gitlab/mr/311' 2021-02-17 13:22:36 -05:00
Nick Mathewson
aebd0a4080 Make our configure.ac script use the portable = comparison
Back in 0.4.5.1-alpha we added an `==` comparison, which isn't
portable.

Fixes bug #40298; bugfix on 0.4.5.1-alpha.
2021-02-17 12:36:23 -05:00
Roger Dingledine
8a8045c788 relay: No longer test dirport reachability for authorities
Now that exit relays don't allow exit connections to directory authority
DirPorts, the follow-up step is to make directory authorities stop doing
DirPort reachability checks.

Fixes #40287

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-17 10:28:18 -05:00
David Goulet
9f61d9238c metrics: Handle the connection finished flushing event
Turns out, we forgot to add the METRICS connection type fo the finished
flushing handler.

Fixes #40295

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-17 09:54:05 -05:00
Nick Mathewson
e74fc69448 Remove changes files from master that will appear in 0.4.5.6 2021-02-12 13:43:38 -05:00
David Goulet
71e9c56578 Merge branch 'maint-0.4.5' 2021-02-12 13:13:57 -05:00
David Goulet
5887c1f1f3 Merge branch 'tor-gitlab/mr/304' into maint-0.4.5 2021-02-12 13:13:50 -05:00
David Goulet
dfcb050bbf config: Do not compare for duplicate ORPorts with different addresses
We were just looking at the family which is not correct because it is possible
to have two explicit ORPort for the same family but different addresses. One
example is:

  ORPort 127.0.0.1:9001 NoAdvertise
  ORPort 1.2.3.4:9001 NoListen

Thus, this patch now ignores ports that have different addresses iff they are
both explicits. That is, if we have this example, also two different
addresses:

  ORPort 9001
  ORPort 127.0.0.1:9001 NoAdvertise

The first one is implicit and second one is explicit and thus we have to
consider them for removal which in this case would remove the "ORPort 9001" in
favor of the second port.

Fixes #40289

Signe-off-by: David Goulet <dgoulet@torproject.org>
2021-02-12 13:13:43 -05:00
David Goulet
c1b5e7fa1b Merge branch 'maint-0.4.5' 2021-02-12 12:57:18 -05:00
David Goulet
73bedcaf4d Merge branch 'tor-gitlab/mr/303' into maint-0.4.5 2021-02-12 12:54:52 -05:00
George Kadianakis
9b6b1aedcd Merge branch 'maint-0.4.5' 2021-02-12 13:54:18 +02:00
George Kadianakis
088a74aaab Merge remote-tracking branch 'tor-gitlab/mr/294' into maint-0.4.5 2021-02-12 13:53:45 +02:00
George Kadianakis
9fbedc74c3 Merge branch 'maint-0.4.5' 2021-02-12 13:50:36 +02:00
George Kadianakis
58b5300f44 Merge remote-tracking branch 'tor-gitlab/mr/295' into maint-0.4.5 2021-02-12 13:44:03 +02:00
David Goulet
ae5800cd9f relay: Allow RFC1918 addresses for non public relays
In other words, if PublishServerDescriptor is set to 0 and AssumeReachable to
1, then allow a relay to hold a RFC1918 address.

Reasons for this are documented in #40208

Fixes #40208

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-10 13:24:21 -05:00
Nick Mathewson
14e1c2fe0a Merge branch 'maint-0.4.5' 2021-02-08 14:31:13 -05:00
Nick Mathewson
758000aa98 Merge remote-tracking branch 'tor-gitlab/mr/296' into maint-0.4.5 2021-02-08 14:30:11 -05:00
Nick Mathewson
d6b82d79dc Merge branch 'maint-0.4.5' 2021-02-08 14:28:19 -05:00
David Goulet
01c4abc2d4 conn: Properly close MetricsPort socket on EOF
Handle the EOF situation for a metrics connection. Furthermore, if we failed
to fetch the data from the inbuf properly, mark the socket as closed because
the caller, connection_process_inbuf(), assumes that we did so on error.

Fixes #40257

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-08 14:26:45 -05:00
Nick Mathewson
0efc1e6372 40274: Add a changes file and make the same change with FD_CLOEXEC 2021-02-08 12:39:12 -05:00
Nick Mathewson
56f1cab9c1 Don't log supported-protover warnings if consensus is older than Tor.
Previously we would warn in this case... but there's really no
justification for doing so, and it can only cause confusion.

Fixes bug #40281; bugfix on 0.4.0.1-alpha.
2021-02-08 11:52:53 -05:00
David Goulet
685c4866ac relay: Look at the omit IPv6 flag when publishing
In two instances we must look at this flag:

1. When we build the descriptor so the IPv6 is NOT added to the descriptor in
   case we judge that we need to omit the address but still publish.

2. When we are deciding if the descriptor is publishable. This flags tells us
   that the IPv6 was not found reachable but we should still publish.

Fixes #40279

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-08 11:51:45 -05:00
Nick Mathewson
8d80126eee Remove DirCache=1 from list of supported versions.
Closes #40221
2021-02-08 11:40:35 -05:00
Nick Mathewson
576e248bc2 Merge remote-tracking branch 'tor-gitlab/mr/278' 2021-02-08 10:44:58 -05:00
Nick Mathewson
90add50550 Merge branch 'bug40249_squashed' 2021-02-08 10:31:30 -05:00
Nick Mathewson
d159bdb0f4 Add a colon to ticket40249 changes entry 2021-02-08 10:31:18 -05:00
Neel Chauhan
2391c60c5c Add stream ID to ADDRMAP control event 2021-02-08 10:23:41 -05:00
George Kadianakis
d4255253b0 Merge remote-tracking branch 'tor-gitlab/mr/212' 2021-02-08 13:03:07 +02:00
Alexander Færøy
49c61c1bb8 Delete changes/40241_v2 as it breaks CI.
Unreviewed build fix. Discussed the cnage on IRC with Nick.
2021-02-05 19:18:13 +00:00
George Kadianakis
0ba0d738a8 Merge remote-tracking branch 'tor-gitlab/mr/279' 2021-02-02 15:25:22 +02:00
Nick Mathewson
1eec42dee4 Remove changes files merged in 0455-rc 2021-01-29 17:11:13 -05:00
David Goulet
b2434d30d2 Merge branch 'tor-gitlab/mr/285' into ticket2667_044_01 2021-01-29 14:54:21 -05:00
David Goulet
705fd37875 Merge branch 'tor-gitlab/mr/284' into ticket2667_043_01 2021-01-29 14:51:38 -05:00
David Goulet
ec9575944a Merge branch 'maint-0.4.5' 2021-01-29 14:40:56 -05:00
Roger Dingledine
632688c797 exit: Deny re-entry into the network
Exit relays now reject exit attempts to known relay addresses + ORPort and
also to authorities on the ORPort and DirPort.

Closes #2667

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-29 14:28:54 -05:00
Roger Dingledine
93ac6ec4d3 exit: Deny re-entry into the network
Exit relays now reject exit attempts to known relay addresses + ORPort and
also to authorities on the ORPort and DirPort.

Closes #2667

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-29 14:19:17 -05:00
David Goulet
ea38016202 Merge branch 'maint-0.4.3' into maint-0.4.4 2021-01-28 12:46:31 -05:00
David Goulet
79cb47cfc2 Merge branch 'maint-0.3.5' into maint-0.4.3 2021-01-28 12:46:31 -05:00
David Goulet
9556276f07 Merge branch 'tor-gitlab/mr/50' into maint-0.3.5 2021-01-28 12:46:24 -05:00
David Goulet
be81ecba3a Merge branch 'maint-0.4.3' into maint-0.4.4 2021-01-28 12:42:31 -05:00
David Goulet
f058db1f3d Merge branch 'maint-0.3.5' into maint-0.4.3 2021-01-28 12:42:31 -05:00
David Goulet
290007e3c4 Merge branch 'tor-gitlab/mr/239' into maint-0.3.5 2021-01-28 12:42:26 -05:00
David Goulet
a3f2bc8f13 Merge branch 'maint-0.4.3' into maint-0.4.4 2021-01-28 12:36:42 -05:00
David Goulet
f3da5f88d7 Merge branch 'maint-0.3.5' into maint-0.4.3 2021-01-28 12:36:42 -05:00
David Goulet
02bd135cb1 Merge branch 'tor-gitlab/mr/243' into maint-0.3.5 2021-01-28 12:36:35 -05:00
David Goulet
1887231afb Merge branch 'tor-gitlab/mr/256' into maint-0.4.4 2021-01-28 12:12:01 -05:00
David Goulet
5c89197c9f Merge branch 'tor-gitlab/mr/255' into maint-0.4.3 2021-01-28 12:11:33 -05:00
David Goulet
1bdccc03a9 Merge branch 'tor-gitlab/mr/254' into maint-0.3.5 2021-01-28 12:10:39 -05:00
David Goulet
6186288eb6 Merge branch 'maint-0.3.5' into maint-0.4.3 2021-01-28 12:08:20 -05:00
David Goulet
045db909c2 Merge remote-tracking branch 'tor-gitlab/mr/140' into maint-0.3.5 2021-01-28 12:08:14 -05:00
David Goulet
737cd79c42 Merge branch 'maint-0.4.3' into maint-0.4.4 2021-01-28 12:04:42 -05:00
David Goulet
a17be1b5b6 Merge branch 'maint-0.3.5' into maint-0.4.3 2021-01-28 12:04:42 -05:00
David Goulet
c6fb26695b Merge remote-tracking branch 'tor-gitlab/mr/186' into maint-0.3.5 2021-01-28 12:04:37 -05:00
Neel Chauhan
a82b4eb305 src/core/mainloop: Put brackets around IPv6 addresses in log messages 2021-01-27 08:23:39 -08:00
David Goulet
a634f6b64c dos: Move config options within the subsystem
Closes #40261

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-27 10:37:36 -05:00
Nick Mathewson
b019c83853 Merge branch 'maint-0.4.5' 2021-01-27 09:36:39 -05:00
David Goulet
2e600019ea relay: Don't trigger an address discovery without an ORPort
We would before do an address discovery and then a lookup in the cache if not
found which is now simplified by calling relay_find_addr_to_publish() directly
which does all those combined.

Furthermore, by doing so, we won't trigger an address discovery every minute
if we have no ORPort configured for the family.

Fixes #40254

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-27 09:36:17 -05:00
George Kadianakis
dbbd603313 Merge remote-tracking branch 'tor-gitlab/mr/248' 2021-01-27 15:43:01 +02:00
George Kadianakis
a7ca089343 Merge remote-tracking branch 'tor-gitlab/mr/247' 2021-01-27 15:39:29 +02:00
Nick Mathewson
930a17f347 Remove changes files for entries that have appeared in an 045 changelog. 2021-01-22 15:25:04 -05:00
Alexander Færøy
d2c2204b2a Slightly reword the changes file and rename it. 2021-01-22 13:22:14 +00:00
Hello71
2e76b02401 path: fix directory special case 2021-01-22 13:19:52 +00:00
George Kadianakis
74cfe3611f Merge branch 'maint-0.4.5' 2021-01-22 00:21:21 +02:00
George Kadianakis
4cbd22f1a7 Merge branch 'mr/251' into maint-0.4.5 2021-01-22 00:21:09 +02:00
George Kadianakis
5d711450dd Changes file for #40238. 2021-01-21 23:17:31 +02:00
David Goulet
e06a0e904c Merge branch 'maint-0.4.4' into maint-0.4.5 2021-01-21 16:07:16 -05:00
David Goulet
2a3cf37450 Merge branch 'maint-0.4.3' into maint-0.4.4 2021-01-21 16:06:54 -05:00
David Goulet
c09f8da8a9 Merge branch 'maint-0.3.5' into maint-0.4.3 2021-01-21 16:06:54 -05:00
David Goulet
8500700aa4 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>
2021-01-21 16:06:31 -05:00
David Goulet
9be33755ef Merge branch 'maint-0.4.5' 2021-01-21 14:58:39 -05:00
David Goulet
c54f4b81da Merge branch 'tor-gitlab/mr/270' into maint-0.4.5 2021-01-21 14:58:31 -05:00
Roger Dingledine
633b68bfe2 log more during consensus voting process
Give more visibility to directory authority operators during the consensus
voting process.

Closes ticket 40245.
2021-01-21 13:46:56 -05:00
Nick Mathewson
b2536c97f9 Merge branch 'maint-0.4.5' 2021-01-21 13:40:46 -05:00
Nick Mathewson
08c0ef61d8 fix changes file 2021-01-21 13:39:40 -05:00
Nick Mathewson
3d952b461d Merge remote-tracking branch 'tor-gitlab/mr/269' into maint-0.4.5 2021-01-21 13:37:21 -05:00
Nick Mathewson
2243fc3ad1 Merge branch 'maint-0.4.5' 2021-01-21 13:19:49 -05:00
Nick Mathewson
9390e2bf83 Merge remote-tracking branch 'tor-gitlab/mr/268' into maint-0.4.5 2021-01-21 13:10:16 -05:00
David Goulet
8a27860720 Merge branch 'maint-0.4.5' 2021-01-21 12:27:34 -05:00
David Goulet
7b102d53e3 Merge branch 'tor-gitlab/mr/265' into maint-0.4.5 2021-01-21 12:27:27 -05:00
David Goulet
2c4355fcec changes: Align text in bug40236
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-20 16:26:28 -05:00
David Goulet
61803775e8 Merge branch 'tor-gitlab/mr/264' 2021-01-20 16:22:36 -05:00
David Goulet
7692f443d4 config: Remove Bridge <-> ClientTransportPlugin validation
This validation was only done if DisableNetwork was off because we would use
the global list of transports/bridges and DisableNetwork would not populate
it.

This was a problem for any user using DisableNetwork which includes Tor
Browser and thus leading to the Bug() warning.

Without a more in depth refactoring, we can't do this validation without the
global list.

The previous commit makes it that any connection to a bridge without a
transport won't happen thus we keep the security feature of not connecting to
a bridge without its corresponding transport.

Related to #40106

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-20 15:56:19 -05:00
Alexander Færøy
c38c36e5f1 Limit the number of items in the consdiffmgr on Windows.
This patch limits the number of items in the consensus diff cache to 64
on the Windows platform. Hopefully, this will allow us to investigate a
smarter fix while avoiding the situation reported in tor#24857 where
Windows relay operators report Tor using 100% CPU.

See: tor#24857
2021-01-20 16:33:17 +00:00
Nick Mathewson
b0af4ddc7c Merge branch 'maint-0.4.5' 2021-01-19 13:20:43 -05:00
Nick Mathewson
27ee12836d Merge remote-tracking branch 'tor-gitlab/mr/261' into maint-0.4.5 2021-01-19 13:20:31 -05:00
Nick Mathewson
b7f886beb4 Merge remote-tracking branch 'tor-gitlab/mr/163' into maint-0.4.3 2021-01-19 12:53:44 -05:00
Nick Mathewson
faf7b550e7 Merge remote-tracking branch 'tor-gitlab/mr/143' into maint-0.3.5 2021-01-19 12:53:30 -05:00
Nick Mathewson
5f53e013cd Merge branch 'maint-0.4.5' 2021-01-19 12:49:31 -05:00
Nick Mathewson
6c1bc570cf Merge branch 'maint-0.4.4' into maint-0.4.5 2021-01-19 12:49:31 -05:00
Nick Mathewson
4c82c2d1d4 Merge branch 'maint-0.4.3' into maint-0.4.4 2021-01-19 12:49:22 -05:00
Nick Mathewson
a22bfe04bc Merge branch 'maint-0.3.5' into maint-0.4.3 2021-01-19 12:45:07 -05:00
Alexander Færøy
13cf964453 Remove unnecessary non-fatal assertion.
This patch removes a call to `tor_assert_nonfatal()` if
`extend_info_from_node()` returns NULL. This is unnecessary as we
already handle the case where `info` is NULL in the next `if (!info) {
... }` block in the code.

See: tor#32666.
2021-01-19 17:08:01 +00:00
Nick Mathewson
4961645254 Merge branch 'maint-0.4.5' 2021-01-19 12:02:28 -05:00
Nick Mathewson
f79a31f6d5 Merge remote-tracking branch 'tor-gitlab/mr/260' into maint-0.4.5 2021-01-19 12:02:21 -05:00
Nick Mathewson
85c4087de9 Merge branch 'maint-0.4.5' 2021-01-19 12:00:06 -05:00
Ali Raheem
07f37c64f8 Bugfix for 40236
Make configure script minireport accurate automatic detection and usage of liblzma and libzstd
2021-01-18 19:37:26 +00:00
David Goulet
691c717187 Revert "IPv6 sybil: consider addresses in the same /64 to be equal."
This reverts commit d07f17f676.

We don't want to consider an entire routable IPv6 network as sybil if more
than 2 relays happen to be on it. For path selection it is very important but
not for selecting relays in the consensus.

Fixes #40243
2021-01-15 12:57:57 -05:00
David Goulet
f0c29f0883 relay: Don't BUG() if we can't find authority descriptor
We can end up trying to find our address from an authority while we don't have
yet its descriptor.

In this case, don't BUG() and just come back later.

Closes #40231

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-14 10:02:03 -05:00
Nick Mathewson
fa8ecf8820 Better fix for #40241 (--enable-all-bugs-are-fatal and fallthrough)
This one should work on GCC _and_ on Clang.  The previous version
made Clang happier by not having unreachable "fallthrough"
statements, but made GCC sad because GCC didn't think that the
unconditional failures were really unconditional, and therefore
_wanted_ a FALLTHROUGH.

This patch adds a FALLTHROUGH_UNLESS_ALL_BUGS_ARE_FATAL macro that
seems to please both GCC and Clang in this case: ordinarily it is a
FALLTHROUGH, but when ALL_BUGS_ARE_FATAL is defined, it's an
abort().

Fixes bug 40241 again.  Bugfix on earlier fix for 40241, which was
merged into maint-0.3.5 and forward, and released in 0.4.5.3-rc.
2021-01-13 09:54:43 -05:00
David Goulet
c5817a0daf m4: Change LIBS order of TOR_SEARCH_LIBRARY()
Some gcc versions do explode if the order of the linker flags are not correct.
One issue was statically building OpenSSL which would require that "-lssl
-lcrypto" be put _before_ the "-lpthread -ldl" flags.

I have not such problem with GCC 10 but does with GCC 9.

Closes #33624

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-13 09:52:10 -05: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
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
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