Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

29018: ExtraInfoStatistics fixes and unit tests #709

Merged
19 commits merged into from
Mar 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
85c598c
stats: Make PaddingStatistics depend on ExtraInfoStatistics
teor2345 Jan 8, 2019
361738c
Merge branch 'bug29017-033' into bug29017-master-merge
teor2345 Feb 19, 2019
a798bd4
stats: Stop reporting statistics when ExtraInfoStatistics is 0
teor2345 Jan 8, 2019
6c5a506
router: split router_build_fresh_descriptor() into static functions
teor2345 Jan 10, 2019
f19b64d
router: refactor router_build_fresh_descriptor() static function inte…
teor2345 Jan 10, 2019
a65c101
router: check for NULL in router_build_fresh_descriptor() static func…
teor2345 Jan 10, 2019
af0a43b
router: eliminate tiny router_build_fresh_descriptor() static functions
teor2345 Jan 10, 2019
9cab988
router: eliminate router_update_info_send_unencrypted()
teor2345 Jan 10, 2019
a1f8558
router: Move extrainfo signing into its own function
teor2345 Jan 10, 2019
a9f852a
router: Document the additional config and state used to dump descrip…
teor2345 Jan 10, 2019
7c9450f
test_router: Add comment to explain mocking
teor2345 Jan 10, 2019
53b49d1
test_dir: Unit tests for RSA-only router and extrainfo descriptor cre…
teor2345 Feb 18, 2019
7a2c8da
test_dir: Split test_dir_formats into separate rsa and rsa_ed25519 tests
teor2345 Feb 18, 2019
8e5df40
test_dir: Test rsa + ed25519 extrainfo creation and parsing
teor2345 Feb 18, 2019
38fc52a
test_dir: Refactor common code out of the dir_format unit tests
teor2345 Feb 19, 2019
39ab6c9
test_dir: Test descriptor variants
teor2345 Feb 19, 2019
0c0f215
routerkeys: Log failures at info-level in make_tap_onion_key_crosscert()
teor2345 Feb 19, 2019
51f59f2
router: Add some missing #endif comments
teor2345 Feb 19, 2019
6c652ea
fixup! test_dir: Refactor common code out of the dir_format unit tests
teor2345 Feb 19, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changes/bug29017
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
o Minor bugfixes (stats):
- When ExtraInfoStatistics is 0, stop including PaddingStatistics in
relay and bridge extra-info documents. Fixes bug 29017;
bugfix on 0.3.1.1-alpha.
5 changes: 5 additions & 0 deletions changes/bug29018
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
o Minor bugfixes (stats):
- When ExtraInfoStatistics is 0, stop including bandwidth usage statistics,
GeoIPFile hashes, ServerTransportPlugin lines, and bridge statistics
by country in extra-info documents. Fixes bug 29018;
bugfix on 0.2.4.1-alpha.
7 changes: 5 additions & 2 deletions doc/tor.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2313,7 +2313,8 @@ is non-zero):
When this option is enabled and BridgeRelay is also enabled, and we have
GeoIP data, Tor keeps a per-country count of how many client
addresses have contacted it so that it can help the bridge authority guess
which countries have blocked access to it. (Default: 1)
which countries have blocked access to it. If ExtraInfoStatistics is
enabled, it will be published as part of extra-info document. (Default: 1)

[[ServerDNSRandomizeCase]] **ServerDNSRandomizeCase** **0**|**1**::
When this option is set, Tor sets the case of each character randomly in
Expand All @@ -2340,7 +2341,7 @@ is non-zero):
extra-info document. (Default: 0)

[[PaddingStatistics]] **PaddingStatistics** **0**|**1**::
Relays only.
Relays and bridges only.
When this option is enabled, Tor collects statistics for padding cells
sent and received by this relay, in addition to total cell counts.
These statistics are rounded, and omitted if traffic is low. This
Expand Down Expand Up @@ -2395,6 +2396,8 @@ is non-zero):
[[ExtraInfoStatistics]] **ExtraInfoStatistics** **0**|**1**::
When this option is enabled, Tor includes previously gathered statistics in
its extra-info documents that it uploads to the directory authorities.
Disabling this option also disables bandwidth usage statistics, GeoIPFile
hashes, and ServerTransportPlugin lists in the extra-info file.
(Default: 1)

[[ExtendAllowPrivateAddresses]] **ExtendAllowPrivateAddresses** **0**|**1**::
Expand Down
4 changes: 2 additions & 2 deletions src/feature/nodelist/torcert.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ tor_cert_describe_signature_status(const tor_cert_t *cert)
}

/** Return a new copy of <b>cert</b> */
tor_cert_t *
tor_cert_dup(const tor_cert_t *cert)
MOCK_IMPL(tor_cert_t *,
tor_cert_dup,(const tor_cert_t *cert))
{
tor_cert_t *newcert = tor_memdup(cert, sizeof(tor_cert_t));
if (cert->encoded)
Expand Down
2 changes: 1 addition & 1 deletion src/feature/nodelist/torcert.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ int tor_cert_checksig(tor_cert_t *cert,
const ed25519_public_key_t *pubkey, time_t now);
const char *tor_cert_describe_signature_status(const tor_cert_t *cert);

tor_cert_t *tor_cert_dup(const tor_cert_t *cert);
MOCK_DECL(tor_cert_t *,tor_cert_dup,(const tor_cert_t *cert));
int tor_cert_eq(const tor_cert_t *cert1, const tor_cert_t *cert2);
int tor_cert_opt_eq(const tor_cert_t *cert1, const tor_cert_t *cert2);

Expand Down
Loading