Commit Graph

38159 Commits

Author SHA1 Message Date
Tor CI Release
e39be4a14f Update geoip files to match ipfire location db, 2022/11/10. 2022-11-10 09:43:47 -05:00
David Goulet
e94c27c0ab metrics: Split cc with counters and gauges
Part of #40712

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-10 08:57:39 -05:00
David Goulet
2737037ccd metrics: Split connections with a counter and gauge
Created and Rejected connections are ever going up counters. While
Opened connections are gauges going up and down.

Fixes #40712

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-10 07:29:18 -05:00
David Goulet
e2a94e050d changes: Add file for ticket 40674
Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-09 15:35:51 -05:00
David Goulet
c13dc8b08a Merge branch 'ticket40674_047_01' into maint-0.4.7 2022-11-09 15:32:18 -05:00
Rasmus Dahlberg
21eac1e8d8 dns: Make TTLs fuzzy at exit relays
This change mitigates DNS-based website oracles by making the time that
a domain name is cached uncertain (+- 4 minutes of what's measurable).

Resolves TROVE-2021-009.

Fixes #40674
2022-11-09 15:30:43 -05:00
David Goulet
780ca741f3 relay: Cache onion queue parameters on consensus change
This is part of the fast path so we need to cache consensus parameters
instead of querying it everytime we need to learn a value.

Part of #40704

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-09 15:12:51 -05:00
David Goulet
e3f6908984 relay: Make the max pending tasks per CPU a consensus parameter
Until now, there was this magic number (64) used as the maximum number
of tasks a CPU worker can take at once.

This commit makes it a consensus parameter so our future selves can
think of a better value depending on network conditions.

Part of #40704

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-09 13:13:21 -05:00
David Goulet
9c8c7804d5 relay: Add the onion_queue_wait_cutoff consensus param
Transform the hardcoded value ONIONQUEUE_WAIT_CUTOFF into a consensus
parameter so we can control it network wide.

Closes #40704

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-09 11:57:32 -05:00
David Goulet
93523ed0d6 relay: Make MaxOnionQueueDelay into a consensus param
Part of #40704

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-09 11:57:32 -05:00
David Goulet
4db03ac360 Merge branch 'tor-gitlab/mr/654' into maint-0.4.7 2022-11-09 11:51:46 -05:00
Mike Perry
04fafeb2dd metrics: Reorganize state labels so rate() can be applied
Part of #40708.
2022-11-09 11:48:42 -05:00
Mike Perry
09d32ac667 metrics: Use N_EWMA for moving avg, with N=100.
Part of #40708.
2022-11-09 11:48:42 -05:00
David Goulet
fe045f02d0 Merge branch 'maint-0.4.5' into maint-0.4.7 2022-11-09 11:47:06 -05:00
Sam James
ee38514cc4 build: fix -Wstrict-prototypes (Clang 16)
Clang 16 warns on -Wstrict-prototypes in preparation for C23 which can
among other things, lead to some configure tests silently failing/returning the wrong result.

Fixes this error:
```
-ignoreme: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
+ignoreme: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
 main ()
```

For more information, see LWN.net [0] or LLVM's Discourse [1], gentoo-dev@ [2],
or the (new) c-std-porting mailing list [3].

[0] https://lwn.net/Articles/913505/
[1] https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213
[2] https://archives.gentoo.org/gentoo-dev/message/dd9f2d3082b8b6f8dfbccb0639e6e240
[3] hosted at lists.linux.dev.

Bug: https://bugs.gentoo.org/879747
Signed-off-by: Sam James <sam@gentoo.org>
---
2022-11-09 11:46:55 -05:00
David Goulet
5b0103cfb4 Merge branch 'tor-gitlab/mr/651' into maint-0.4.7 2022-11-08 15:25:08 -05:00
Mike Perry
59bef48490 metrics: Record percentage of blocked channels
Part of #40708.
2022-11-08 18:25:07 +00:00
Mike Perry
00633bc619 metrics: Report amount of cwnd drop from delta and gamma
Part of #40708.
2022-11-08 12:47:14 -05:00
David Goulet
fde87096c3 Merge branch 'tor-gitlab/mr/650' into maint-0.4.7 2022-11-08 12:36:19 -05:00
David Goulet
d634a5ebc7 relay: Remove unused conn->ext_or_conn_id
This also incidently removes a use of uninitialized stack data from the
connection_or_set_ext_or_identifier() function.

Fixes #40648

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-08 12:35:09 -05:00
David Goulet
2066e0494c math: Replace naughty macro by an inline function
Part of #40708

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-07 14:49:41 -05:00
Mike Perry
fec9757a37 metrics: Add flow control metrics.
Part of #40708.
2022-11-07 09:55:06 -05:00
Mike Perry
2f7e05d89d metrics: Add stats when the clock stalls.
Part of #40708.
2022-11-07 09:55:06 -05:00
Mike Perry
83fdaff7c0 metrics: Add running average of CC cwnd in slow start when closing circuit
Count slow start separately.

Part of #40708

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-07 09:55:06 -05:00
David Goulet
f270d20cb0 changes: Add file for ticket 40708
Closes #40708

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-07 09:55:06 -05:00
David Goulet
62ce557b0b metrics: Add stats when reaching vegas delta or ss_cwnd_max
Part of #40708

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-07 09:55:06 -05:00
David Goulet
a0e72fcb97 metrics: Add running average of CC cwnd when closing circuit
Part of #40708

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-07 09:55:06 -05:00
David Goulet
c565ef9c58 metrics: Add running average of CC cwnd when exiting slow start
Part of #40708

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-07 09:55:06 -05:00
David Goulet
6196e9596a metrics: Add connection socket family to metrics
Adds either ipv4 or ipv6 to the "tor_relay_connections_total" stats.

Closes #40710

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-03 13:05:21 -04:00
David Goulet
87e820a0c5 metrics: Add stats for num circ reaching max cell outq
Part of #40708

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-03 09:37:38 -04:00
Rasmus Dahlberg
0fe2096144 Clip DNS TTL values once in event callback
This change ensures that other parts of the code base always operate on
the same clipped TTL values, notably without being aware of clipping.
2022-11-01 09:29:19 -04:00
David Goulet
619dd35321 sandbox: Add my-consensus-<flavor-name> to sandbox for dirauth
Fixese #40663

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-31 11:37:43 -04:00
David Goulet
5db238f3e3 thread: Bump max detectable CPU from 16 to 128
Lets take advantage of those beefy machines ;).

Closes #40703

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-28 11:28:43 -04:00
David Goulet
f09b913e18 Merge branch 'tor-gitlab/mr/645' into maint-0.4.7 2022-10-27 11:42:07 -04:00
David Goulet
72f52d2c85 Merge branch 'tor-gitlab/mr/644' into maint-0.4.7 2022-10-27 11:41:43 -04:00
David Goulet
6d40e980fb metrics: Treat relay connections as gauge, not counter
Fixes #40699

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-27 11:37:21 -04:00
Mike Perry
b30193416c Changes file for 40683 2022-10-27 15:36:53 +00:00
Alexander Færøy
256339712d Strip "__.SYMDEF*" before re-archiving in combine_libs on macOS and iOS.
This patch changes how combine_libs works on Darwin like platforms to
make sure we don't include any `__.SYMDEF` and `__.SYMDEF SORTED`
symbols on the archive before we repack and run ${RANLIB} on the
archive.

See: tpo/core/tor#40683.
2022-10-27 15:18:01 +00:00
David Goulet
504a6da5ab changes: Update changes for ticket 40194
Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-27 10:50:37 -04:00
David Goulet
177f3a40eb metrics: Add number of opened circuits to MetricsPort
Related to #40194

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-27 10:48:52 -04:00
David Goulet
1a2d93f72a relay: Add our consensus relay flag to MetricsPort
Related to #40194

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-27 10:48:52 -04:00
David Goulet
48ab17cc72 metrics: Add traffic related stats to MetricsPort
At this commit, bytes read and written are exported.

Related to #40194

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-27 10:48:48 -04:00
David Goulet
cd7be492d1 relay: Add DoS subsystem stats to MetricsPort
Related to #40194

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-27 10:47:56 -04:00
David Goulet
a1c40c8511 metrics: Fix naming and documentation
After nickm's review, minor changes to names and comments.

Related to #40194

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-27 10:45:08 -04:00
David Goulet
06a26f1872 relay: Change the connection metrics name
Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-26 15:16:48 -04:00
David Goulet
00f714b374 relay: Add CC RTT reset stats to MetricsPort
Related to #40194

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-26 15:16:48 -04:00
David Goulet
e7e18ae914 relay: Add total number of streams seen on MetricsPort
Related to #40194

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-26 15:16:48 -04:00
David Goulet
98b98fd3ce rephist: Track number of streams seen per type
Related to #40194

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-26 15:16:48 -04:00
David Goulet
609a82a595 changes: Ticket 40694
Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-26 15:10:41 -04:00
David Goulet
78c184d2fe hs: Retry service rendezvous on circuit close
Move the retry from circuit_expire_building() to when the offending
circuit is being closed.

Fixes #40695

Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-26 15:10:39 -04:00