Commit Graph

27071 Commits

Author SHA1 Message Date
Nick Mathewson 0229d5f818 Add "Heartbeat" to the start of several heartbeat messages.
Closes #40322.
2021-03-19 13:33:56 -04:00
Nick Mathewson 3f7824ff68 bump to 0.4.6.1-alpha-dev 2021-03-18 13:48:19 -04:00
Nick Mathewson cd0e5a942e Terminate rep_hist_get_overload_stats_lines() with an NL.
We use it in router.c, where chunks are joined with "", not with
NL... so leaving off the terminating NL will lead to an unparseable
extrainfo.

Found by toralf. Bug not in any released Tor.
2021-03-18 13:30:49 -04:00
George Kadianakis 80da1761a6 Fix compiler warning about signed/unsigned conversion.
```
src/feature/stats/rephist.c: In function ‘overload_happened_recently’:
src/feature/stats/rephist.c:215:21: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
   if (overload_time > approx_time() - 3600 * n_hours) {
```
from https://gitlab.torproject.org/tpo/core/tor/-/issues/40341#note_2729364
2021-03-17 20:03:39 +02:00
George Kadianakis 29f07a4e9d Merge branch 'mr/334' 2021-03-17 18:23:18 +02:00
George Kadianakis 7740a8b5d4 Rate-limit counter should increase once per minute. 2021-03-17 18:22:38 +02:00
George Kadianakis e688580277 Implement rate limiting metrics. 2021-03-17 18:22:38 +02:00
George Kadianakis faf1fe833e Implement port/file-descriptor exhaustion metric.
This uses a heuristic that came up after a discussion with David.

I'm leaving this as a separate commit so that it can be discussed further if
needed.
2021-03-17 18:22:38 +02:00
George Kadianakis f493a12e89 Implement straightforward overload general metrics.
- OOM metric
- onionskin overload metric
- DNS timeout metric
2021-03-17 18:22:38 +02:00
George Kadianakis 0a5ecb3342 Implement backbone of overload statistics.
- Implement overload statistics structure.
- Implement function that keeps track of overload statistics.
- Implement function that writes overload statistics to descriptor.
- Unittest for the whole logic.
2021-03-17 18:22:38 +02:00
David Goulet 15a95df376 Merge branch 'tor-gitlab/mr/337' 2021-03-17 11:53:14 -04:00
Nick Mathewson 066748c9cd Add a DormantTimeoutEnabled to disable dormant mode entirely
(If you need to do this in an older version you can just set
DormantClientTimeout to something huge.)

Closes #40228.
2021-03-17 11:53:09 -04:00
George Kadianakis 0ac03390e4 Merge branch 'maint-0.4.5' 2021-03-17 13:43:48 +02:00
George Kadianakis 59bbf8cde9 Merge remote-tracking branch 'tor-gitlab/mr/333' into maint-0.4.5 2021-03-17 13:43:38 +02:00
Nick Mathewson d66178c7b7 Bump version to 0.4.5.7-dev 2021-03-16 09:18:27 -04:00
Nick Mathewson 61731e3550 Merge branch 'maint-0.4.4' into maint-0.4.5 2021-03-15 09:01:59 -04:00
Nick Mathewson 3268403ba1 Merge branch 'maint-0.4.5' 2021-03-15 09:01:59 -04:00
Nick Mathewson 5ec579610a Merge branch 'maint-0.3.5' into maint-0.4.4 2021-03-15 09:01:59 -04:00
Nick Mathewson f078aab71e Merge branch 'bug40316_035_v2' into maint-0.3.5 2021-03-15 08:58:54 -04:00
Nick Mathewson 890ae4fb1a Fix detection of point to insert signatures on a pending consensus.
We were looking for the first instance of "directory-signature "
when instead the correct behavior is to look for the first instance
of "directory-signature " at the start of a line.

Unfortunately, this can be exploited as to crash authorities while
they're voting.

Fixes #40316; bugfix on 0.2.2.4-alpha.  This is TROVE-2021-002,
also tracked as CVE-2021-28090.
2021-03-15 08:56:58 -04:00
Nick Mathewson a6533af9e8 Merge branch 'maint-0.4.4' into maint-0.4.5 2021-03-15 08:54:00 -04:00
Nick Mathewson cfeb063f24 Merge branch 'maint-0.4.5' 2021-03-15 08:54:00 -04:00
Nick Mathewson 2eb900f7e2 Merge branch 'maint-0.3.5' into maint-0.4.4 2021-03-15 08:54:00 -04:00
Nick Mathewson efca9ce41c Clarify new intended strategy with TROVE-2021-001
We're going to disable this feature in all versions for now.
2021-03-15 08:53:36 -04:00
Nick Mathewson efb174df24 Merge branch 'maint-0.4.5' 2021-03-15 08:52:53 -04:00
Nick Mathewson 7c5a67ccd9 Merge branch 'maint-0.4.4' into maint-0.4.5 2021-03-15 08:52:29 -04:00
Nick Mathewson b9f6539008 Merge branch 'maint-0.3.5' into maint-0.4.4 2021-03-15 08:52:28 -04:00
Nick Mathewson f46f4562cf Merge branch 'bug40286_disable_min_035' into maint-0.3.5 2021-03-15 08:41:03 -04:00
Nick Mathewson 8e4965aa36 Bump to 0.4.6.1-alpha 2021-03-15 07:42:47 -04:00
Nick Mathewson be17a5a3cf Bump to 0.4.5.7 2021-03-15 07:41:54 -04:00
Nick Mathewson fb2c889a38 Bump to 0.4.4.8 2021-03-15 07:40:48 -04:00
Nick Mathewson 1a0b5fd569 Bump to 0.3.5.14 2021-03-15 07:39:45 -04:00
Nick Mathewson 444233c15e Run "make autostyle" in advance of new series. 2021-03-12 11:40:48 -05:00
Nick Mathewson b5d08ddc09 Update copyrights to 2021, using "make update-copyright" 2021-03-12 11:39:23 -05:00
Nick Mathewson d7e827a754 Remove MMDB conversion tool.
It was made to convert Maxmind's "mmdb" files into the older format
that we used.  But now thanks to IPFire Location, we don't have to
touch Maxmind formats any more.  (See ticket #40224.)
2021-03-12 11:37:03 -05:00
Nick Mathewson b014866f6a Merge branch 'maint-0.4.4' into maint-0.4.5 2021-03-12 11:30:22 -05:00
Nick Mathewson 0b4a0c1a26 Merge branch 'maint-0.4.5' 2021-03-12 11:30:22 -05:00
Nick Mathewson 41796158e6 Merge branch 'maint-0.3.5' into maint-0.4.4 2021-03-12 11:30:21 -05:00
Nick Mathewson a7b3cb06f5 Update geoip files to match ipfire location db, 2021/03/12. 2021-03-12 11:26:07 -05:00
Nick Mathewson 7d9403b422 Merge remote-tracking branch 'tor-gitlab/mr/336' 2021-03-10 16:47:46 -05:00
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 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 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 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 2eb015372b Merge branch 'tor-gitlab/mr/328' 2021-03-01 08:36:02 -05:00
Nick Mathewson 1b36e50fdd Correct documentation for lib_meminfo.md 2021-03-01 08:13:32 -05:00