Nick Mathewson
b22568a545
Rename OpenSSL_version_num() as defined in Tor
...
This way, if we guess wrong about whether the library has it,
we don't conflict with the library's headers.
Fixes #40181 ; bug not in any released version.
2020-11-06 10:31:32 -05:00
George Kadianakis
dd119b277b
Merge remote-tracking branch 'tor-gitlab/mr/185' into master
2020-11-03 16:06:12 +02:00
George Kadianakis
4f5a116618
Merge remote-tracking branch 'tor-gitlab/mr/187' into master
2020-11-03 13:04:09 +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
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
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
03be7de168
Merge branch 'maint-0.4.4'
2020-10-28 15:39:37 +00: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
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
David Goulet
362229f184
lib/metrics: Fix wrong macro expansion
...
The "METRICS_PREFIX" was not expanded but rather used as a litteral. Fix that
by just removing the define and using "tor_" directly.
Reviewed-by: Alexander Færøy <ahf@torproject.org>
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-10-27 13:00:20 -04:00
David Goulet
5de6673972
metrics: Add tor_ namespace to all metrics
...
Closes #40063
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-10-27 10:43:42 -04:00
David Goulet
238340ce54
test: Add test for onion service metrics module
...
Related to #40063
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-10-27 10:43:42 -04:00
David Goulet
f65c0820af
test: Metrics tests for lib/ and feature/
...
Related to #40063
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-10-27 10:43:42 -04:00
David Goulet
4c19eed35c
tests: Fix unit tests after adding new HS metrics module
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-10-27 10:43:42 -04:00
David Goulet
f2e4204590
changes: File for ticket 40063, the MetricsPort
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-10-27 10:43:42 -04:00
David Goulet
1c06c9f1c0
doc: Initial documentation of the lib/metrics
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-10-27 10:43:42 -04:00
David Goulet
04ff22dc69
man: Add the MetricsPort manpage entry
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-10-27 10:43:42 -04:00
David Goulet
97731196c4
hs: Collect introduction circuit metrics
...
Tracks the total number of established introduction circuit.
Related to #40063
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-10-27 10:43:42 -04:00
David Goulet
c081bee38a
hs: Collect rendezvous circuit metrics
...
The total number of rendezvous circuit created and the number of established
ones which is a gauge that decreases to keep an updated counter.
Related to #40063
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-10-27 10:43:42 -04:00
David Goulet
2fe0322fe4
hs: Collect service traffic metrics
...
Related to #40063
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-10-27 10:43:42 -04:00
David Goulet
695957511b
hs: Always note the virtual port in the ident
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-10-27 10:43:42 -04:00
David Goulet
50f44afeb4
hs: New metrics module
...
At this commit, a new service registers to the module and a store is created.
It also remove itself from the metrics module if it goes away.
In order to hook into the metrics subsystem, this commit attaches the HS
subsystem into the subsystem global list so its get_metrics() call can be
accessible.
HS initialization is still _not_ done through the subsys module as it is
likely require much more testing.
Related to #40063
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-10-27 10:43:42 -04:00
David Goulet
4f5cea1f59
conn: New Metrics listener port
...
If MetricsPort is defined, listen on it and handle the incoming request.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-10-27 10:43:42 -04:00
David Goulet
a882d1bf0a
metrics: New feature module to track tor metrics
...
Related to #40063
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-10-27 10:43:42 -04:00
David Goulet
ec731290a5
lib: New metrics library
...
Used to provide an interface to create metrics store and update the entries.
Related to #40063
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-10-27 10:43:42 -04:00
David Goulet
bd582583f6
Merge branch 'maint-0.4.4'
2020-10-27 10:20:05 -04:00