George Kadianakis
9a98d1da30
Switch v3_onions_seen_this_period to digest256map_t.
2020-11-03 19:14:57 +02:00
George Kadianakis
dd119b277b
Merge remote-tracking branch 'tor-gitlab/mr/185' into master
2020-11-03 16:06:12 +02:00
David Goulet
486ddde2c4
configure: Check STAP_PROBEV macro when building with USDT tracing
...
It turns out that STAP_PROBEV() is not available on FreeBSD thus having
sdt/sdt.h is not enough. Look for it now at configure time.
Closes #40174
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-11-03 09:05:53 -05:00
David Goulet
31d542a9c6
ci: Add DISTCHECK to tracing test on Gitlab
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-11-03 08:36:02 -05:00
George Kadianakis
4f5a116618
Merge remote-tracking branch 'tor-gitlab/mr/187' into master
2020-11-03 13:04:09 +02:00
George Kadianakis
f2da7b05b0
Add changes file for v3 metrics.
...
Closes ticket #23126 .
2020-11-03 11:12:17 +02:00
George Kadianakis
a96432ab06
Abstract v2/v3 "format stats to str" logic into a single function.
2020-11-03 11:12:17 +02:00
George Kadianakis
6178a64fcf
Abstract v2/v3 "write stats to file" logic into a single function.
2020-11-03 11:12:17 +02:00
George Kadianakis
131da887d7
Write unittests for v3 metrics.
2020-11-03 11:12:17 +02:00
George Kadianakis
5c00bee1b1
Introduce v3 stat formatting functions.
...
They will be merged with the v2 ones in later commits.
2020-11-03 11:12:17 +02:00
George Kadianakis
d0be2ae7f9
Extend get_voting_interval() so that it's callable by relays.
...
In the past, only authorities and clients had to use that function because of
the SRV subsystem. However, because of its use in rep_hist_hs_stats_init() it
will now also be used by relays when bootstrapping without a consensus. Make it
do something sensible.
Another approach (instead of using magic values) would be to wait
initialization of HSv3 stats until we get a consensus but that seems messy to
schedule.
Another approach would be to make dirauth_sched_get_configured_interval() also
work for relays (particularly when TestingNetwork is enabled), but that also
seems a good amount of work.
2020-11-03 11:12:17 +02:00
George Kadianakis
f2eff17126
Introduce generic HS stats methods that apply to v2 and v3.
2020-11-03 11:12:17 +02:00
George Kadianakis
3cbc513ae7
Implement support for "v3 rend traffic" stat.
2020-11-03 11:09:34 +02:00
George Kadianakis
05880d238a
Implement support for "unique v3 onions" stat.
2020-11-03 11:09:34 +02:00
George Kadianakis
bd28551763
Introduce v3_stats_t structure and some of its methods.
2020-11-03 11:09:24 +02:00
George Kadianakis
5ed7fcec41
Make room for v3: Complete move from hs_stats_t to hs_v2_stats_t.
2020-11-02 21:05:50 +02:00
George Kadianakis
1de7843658
Make room for v3: s/hs_stats/hs_v2_stats/
2020-11-02 21:05:05 +02:00
George Kadianakis
62d682e624
Make room for v3: Rename rephist objects to signify they are v2-only.
2020-11-02 21:04:43 +02:00
David Goulet
474369e3fa
Merge branch 'tor-gitlab/mr/186'
2020-11-02 13:14:02 -05:00
David Goulet
8b240fbe40
Merge branch 'tor-gitlab/mr/188'
2020-11-02 13:09:15 -05:00
David Goulet
dc6438b549
or: Missing .inc file in include.am
...
Fixes #40173
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-11-02 08:25:48 -05:00
Nick Mathewson
7a75a1064f
Fix another duplicate typedef.
...
Fixes #40177 ; bugfix on 0.4.5.1-alpha.
2020-11-02 07:15:10 -05:00
Nick Mathewson
aa85284038
Update to 0.4.5.1-alpha-dev
2020-11-01 16:41:56 -05:00
Nick Mathewson
2667971336
rewrap changelog
2020-11-01 16:21:25 -05:00
Nick Mathewson
1fd058059c
Edits on ChangeLog from seborn.
2020-11-01 11:46:08 -05:00
Daniel Pinto
f3b9be4422
Implement WIN32 tor_cond_wait using condition variables #30187
...
Fix bug where running a relay on Windows would use 100% CPU
after some time. Makes Windows >= Vista the required Windows
version to build and run tor.
2020-11-01 03:10:25 +00:00
Nick Mathewson
6e25c49f76
Full round of edits on ChangeLog
2020-10-30 11:48:41 -04:00
Nick Mathewson
e01f586e05
Bump version to 0.4.5.1-alpha
2020-10-30 11:05:22 -04:00
Nick Mathewson
013550d645
Sorting and editing on the changelog.
2020-10-30 11:04:38 -04:00
Nick Mathewson
4c165aca04
Run format_changelog
2020-10-30 10:59:14 -04:00
Nick Mathewson
e6d3836d96
Minor edits to changelog headers
2020-10-30 10:58:57 -04:00
Nick Mathewson
7e56f80376
Start a changelog for 0.4.5.1-alpha.
2020-10-30 10:57:21 -04:00
Nick Mathewson
148b5b03a3
Merge branch 'bug40080_035'
2020-10-30 10:51:20 -04:00
George Kadianakis
54e6109499
Merge remote-tracking branch 'tor-gitlab/mr/174' into master
2020-10-30 14:14:14 +02:00
Nick Mathewson
df16376004
Fix duplicate typedef in metrics_store_entry.h
...
Fixes #40171 . Bug not in any released Tor.
2020-10-28 16:36:14 -04:00
Nick Mathewson
f7d0bde4f0
Remove "GETINFO network-status".
...
It was deprecated 0.3.1.1-alpha.
According to #22473 , nothing uses it.
Closes #22473 .
2020-10-28 11:48:23 -04:00
Alexander Færøy
b0e6ec627c
Merge branch 'maint-0.4.3' into maint-0.4.4
2020-10-28 15:39:37 +00:00
Alexander Færøy
4876409c2a
Merge branch 'maint-0.3.5' into maint-0.4.3
2020-10-28 15:39:37 +00:00
Alexander Færøy
03be7de168
Merge branch 'maint-0.4.4'
2020-10-28 15:39:37 +00:00
Nick Mathewson
3f442987f1
Log a warning if Tor was built with any "risky" compile-time options
...
These options are meant for testing builds only, and are likely to
cause trouble if used in a production environment.
Closes #18888 .
2020-10-28 11:34:30 -04:00
Alexander Færøy
c37d05d0c6
Merge remote-tracking branch 'tor-gitlab/mr/171'
2020-10-28 15:15:39 +00:00
Nick Mathewson
c48d25ac8d
Fix a previously overstrict log message check.
...
OpenSSL doesn't seem to report error locations in the same way as
before, which broke one of our tests.
Fixes bug 40170; bugfix on 0.2.8.1-alpha.
2020-10-28 10:47:39 -04:00
Nick Mathewson
59f76a8a1f
Changes file for #40165 (openssl deprecation warnings)
2020-10-28 10:34:22 -04:00
Nick Mathewson
2b4a3d07b2
Do not define OPENSSL_VERSION in compat_openssl.h
...
Apparently it conflicts with definitions elsewhere in Openssl 3.0.0.
2020-10-28 10:32:06 -04:00
Nick Mathewson
e399d32cdf
configure: disable OpenSSL deprecation warnings with OpenSSL >= 3
...
We can't do this in the C headers, since by the time we include
`opensslv.h` in order to check the openssl version number, we will
have included `openssl/macros.h`, which is the thing that checks
whether we disabled deprecation warnings.
2020-10-28 10:30:24 -04:00
Nick Mathewson
d9221968ce
Include a more modest openssl header in crypto_openssl_mgt.h
...
The "engines.h" header has lots of stuff; the "opensslv.h" header
has the version number, which is all we actually need here.
We need to do this because we're about to change this header to
conditionally define OPENSSL_SUPPRESS_DEPRECATED, and it would be
too late to do so if we'd already included "engines.h".
2020-10-28 10:11:42 -04:00
Nick Mathewson
511822529a
Revise fix for bug 32178 (spaces at end of log msg).
...
The loop in the earlier patch would invoke undefined behavior in two
ways: First, it would check whether it was looking at a space before
it checked whether the pointer was in-range. Second, it would let a
pointer reach a position _before_ the start of a string, which is
not allowed.
I've removed the assertion about empty messages: empty messages can
be their own warning IMO.
I've also added tests for this formatting code, to make sure it
actually works.
2020-10-28 09:41:51 -04:00
Amadeusz Pawlik
4520fbc05e
adds change file
2020-10-28 09:09:00 -04:00
Amadeusz Pawlik
ec7a6757ec
Removes trailing spaces in control event log
2020-10-28 09:08:53 -04:00
David Goulet
2edda444da
test: Missing tor_free() in metrics unit tests
...
Found by coverity:
*** CID 1468664: Resource leaks (RESOURCE_LEAK)
/src/test/test_metrics.c: 83 in test_config()
77 tt_int_op(ret, OP_EQ, false);
78
79 done:
80 SMARTLIST_FOREACH(ports, port_cfg_t *, c, port_cfg_free(c));
81 smartlist_free(ports);
82 or_options_free(options);
>>> CID 1468664: Resource leaks (RESOURCE_LEAK)
>>> Variable "err_msg" going out of scope leaks the storage it points to.
83 }
84
85 static char _c_buf[256];
86 #define CONTAINS(conn, msg) \
87 do { \
88 tt_int_op(buf_datalen(conn->outbuf), OP_EQ, (strlen(msg))); \
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-10-28 08:52:02 -04:00