]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
6 years agoscripts/git: Fix a variable name typo in git-push-all.sh
teor [Wed, 23 Oct 2019 03:00:35 +0000 (13:00 +1000)] 
scripts/git: Fix a variable name typo in git-push-all.sh

Obviously correct changes to already reviewed code.

6 years agochanges: file for 29603
teor [Wed, 23 Oct 2019 02:26:32 +0000 (12:26 +1000)] 
changes: file for 29603

We merged this change without a changes file.

6 years agoMerge branch 'maint-0.4.2'
teor [Wed, 23 Oct 2019 00:00:49 +0000 (10:00 +1000)] 
Merge branch 'maint-0.4.2'

6 years agoMerge branch 'maint-0.4.1' into maint-0.4.2
teor [Tue, 22 Oct 2019 23:59:07 +0000 (09:59 +1000)] 
Merge branch 'maint-0.4.1' into maint-0.4.2

`git merge --strategy ours` to use STATIC for unit tests in
maint-0.4.2.

6 years agoMerge branch 'pr1450_squashed' into maint-0.4.1
teor [Tue, 22 Oct 2019 23:58:22 +0000 (09:58 +1000)] 
Merge branch 'pr1450_squashed' into maint-0.4.1

6 years agoAuthorities reject relays running unsupported Tor release series.
Nick Mathewson [Thu, 29 Aug 2019 15:43:43 +0000 (11:43 -0400)] 
Authorities reject relays running unsupported Tor release series.

Our minimum version is now 0.2.9.5-alpha.  Series 0.3.0, 0.3.1,
0.3.2, 0.3.3, and 0.3.4 are now rejected.

Also, extract this version-checking code into a new function, so we
can test it.

Closes ticket 31549.

Also reject 0.3.5.0 through 0.3.5.6-rc as unstable.

6 years agoMerge branch 'maint-0.4.2'
teor [Tue, 22 Oct 2019 22:47:30 +0000 (08:47 +1000)] 
Merge branch 'maint-0.4.2'

6 years agoMerge branch 'maint-0.4.1' into maint-0.4.2
teor [Tue, 22 Oct 2019 22:47:23 +0000 (08:47 +1000)] 
Merge branch 'maint-0.4.1' into maint-0.4.2

6 years agoMerge branch 'maint-0.4.0' into maint-0.4.1
teor [Tue, 22 Oct 2019 22:47:15 +0000 (08:47 +1000)] 
Merge branch 'maint-0.4.0' into maint-0.4.1

6 years agoMerge branch 'maint-0.3.5' into maint-0.4.0
teor [Tue, 22 Oct 2019 22:47:08 +0000 (08:47 +1000)] 
Merge branch 'maint-0.3.5' into maint-0.4.0

6 years agoMerge branch 'maint-0.2.9' into maint-0.3.5
teor [Tue, 22 Oct 2019 22:47:01 +0000 (08:47 +1000)] 
Merge branch 'maint-0.2.9' into maint-0.3.5

6 years agoMerge remote-tracking branch 'tor-github/pr/1361' into maint-0.4.0
teor [Tue, 22 Oct 2019 22:35:17 +0000 (08:35 +1000)] 
Merge remote-tracking branch 'tor-github/pr/1361' into maint-0.4.0

6 years agoMerge remote-tracking branch 'tor-github/pr/1360' into maint-0.3.5
teor [Tue, 22 Oct 2019 22:32:52 +0000 (08:32 +1000)] 
Merge remote-tracking branch 'tor-github/pr/1360' into maint-0.3.5

6 years agoMerge remote-tracking branch 'tor-github/pr/1351' into maint-0.2.9
teor [Tue, 22 Oct 2019 22:32:22 +0000 (08:32 +1000)] 
Merge remote-tracking branch 'tor-github/pr/1351' into maint-0.2.9

6 years agoMerge remote-tracking branch 'tor-github/pr/1284' into maint-0.3.5
teor [Tue, 22 Oct 2019 22:30:48 +0000 (08:30 +1000)] 
Merge remote-tracking branch 'tor-github/pr/1284' into maint-0.3.5

6 years agoMerge remote-tracking branch 'tor-github/pr/1256' into maint-0.3.5
teor [Tue, 22 Oct 2019 22:28:03 +0000 (08:28 +1000)] 
Merge remote-tracking branch 'tor-github/pr/1256' into maint-0.3.5

6 years agoMerge branch 'maint-0.2.9' into maint-0.3.5
teor [Tue, 22 Oct 2019 22:24:30 +0000 (08:24 +1000)] 
Merge branch 'maint-0.2.9' into maint-0.3.5

`git merge --strategy ours` to take the 0.3.5 changes for 31001,
and ignore the conflicting 0.2.9 changes.

6 years agoMerge remote-tracking branch 'tor-github/pr/1178' into maint-0.2.9
teor [Tue, 22 Oct 2019 22:20:45 +0000 (08:20 +1000)] 
Merge remote-tracking branch 'tor-github/pr/1178' into maint-0.2.9

6 years agoRemove outdated note.
Philipp Winter [Thu, 19 Sep 2019 19:42:44 +0000 (12:42 -0700)] 
Remove outdated note.

BridgeDB supports bridge-distribution lines since version 0.5.0:
<https://bugs.torproject.org/23957>

6 years agoclarify in man page: we count by powers of two
Roger Dingledine [Wed, 16 Oct 2019 10:13:14 +0000 (06:13 -0400)] 
clarify in man page: we count by powers of two

Make clear in the man page, in both the bandwidth section and the
accountingmax section, that Tor counts in powers of two, not
powers of ten: 1 GByte is 1024*1024*1024 bytes, not one billion
bytes.

Resolves ticket 32106.

6 years agoTidy whitespace around some STMT_BEGINs and STMT_ENDs
teor [Tue, 22 Oct 2019 21:37:39 +0000 (07:37 +1000)] 
Tidy whitespace around some STMT_BEGINs and STMT_ENDs

6 years agoMerge branch 'maint-0.4.2'
Nick Mathewson [Tue, 22 Oct 2019 18:47:28 +0000 (14:47 -0400)] 
Merge branch 'maint-0.4.2'

6 years agoMerge remote-tracking branch 'tor-github/pr/1441' into maint-0.4.2
Nick Mathewson [Tue, 22 Oct 2019 18:46:10 +0000 (14:46 -0400)] 
Merge remote-tracking branch 'tor-github/pr/1441' into maint-0.4.2

6 years agoRemove changes files that are already merged in 0.4.2.
Nick Mathewson [Tue, 22 Oct 2019 17:01:25 +0000 (13:01 -0400)] 
Remove changes files that are already merged in 0.4.2.

6 years agoMerge branch 'maint-0.4.2'
Nick Mathewson [Tue, 22 Oct 2019 16:54:44 +0000 (12:54 -0400)] 
Merge branch 'maint-0.4.2'

6 years agoMerge branch 'maint-0.4.1' into maint-0.4.2
Nick Mathewson [Tue, 22 Oct 2019 16:54:43 +0000 (12:54 -0400)] 
Merge branch 'maint-0.4.1' into maint-0.4.2

6 years agoMerge remote-tracking branch 'tor-github/pr/1330' into maint-0.4.1
Nick Mathewson [Tue, 22 Oct 2019 16:54:37 +0000 (12:54 -0400)] 
Merge remote-tracking branch 'tor-github/pr/1330' into maint-0.4.1

6 years agoMerge branch 'maint-0.4.2'
Nick Mathewson [Tue, 22 Oct 2019 16:53:12 +0000 (12:53 -0400)] 
Merge branch 'maint-0.4.2'

6 years agoMerge branch 'maint-0.4.1' into maint-0.4.2
Nick Mathewson [Tue, 22 Oct 2019 16:53:12 +0000 (12:53 -0400)] 
Merge branch 'maint-0.4.1' into maint-0.4.2

6 years agoMerge remote-tracking branch 'tor-github/pr/1341' into maint-0.4.1
Nick Mathewson [Tue, 22 Oct 2019 16:53:06 +0000 (12:53 -0400)] 
Merge remote-tracking branch 'tor-github/pr/1341' into maint-0.4.1

6 years agoMerge remote-tracking branch 'tor-github/pr/1446'
Nick Mathewson [Tue, 22 Oct 2019 16:52:32 +0000 (12:52 -0400)] 
Merge remote-tracking branch 'tor-github/pr/1446'

6 years agoMerge branch 'maint-0.4.1' into maint-0.4.2
Nick Mathewson [Tue, 22 Oct 2019 16:51:33 +0000 (12:51 -0400)] 
Merge branch 'maint-0.4.1' into maint-0.4.2

6 years agoMerge branch 'maint-0.4.2'
Nick Mathewson [Tue, 22 Oct 2019 16:51:33 +0000 (12:51 -0400)] 
Merge branch 'maint-0.4.2'

6 years agoMerge remote-tracking branch 'tor-github/pr/1343' into maint-0.4.1
Nick Mathewson [Tue, 22 Oct 2019 16:51:27 +0000 (12:51 -0400)] 
Merge remote-tracking branch 'tor-github/pr/1343' into maint-0.4.1

6 years agoMerge branch 'maint-0.4.1' into maint-0.4.2
Nick Mathewson [Tue, 22 Oct 2019 16:15:14 +0000 (12:15 -0400)] 
Merge branch 'maint-0.4.1' into maint-0.4.2

6 years agoMerge branch 'maint-0.4.2'
Nick Mathewson [Tue, 22 Oct 2019 16:15:14 +0000 (12:15 -0400)] 
Merge branch 'maint-0.4.2'

6 years agoMerge remote-tracking branch 'tor-github/pr/1303' into maint-0.4.1
Nick Mathewson [Tue, 22 Oct 2019 16:15:06 +0000 (12:15 -0400)] 
Merge remote-tracking branch 'tor-github/pr/1303' into maint-0.4.1

6 years agoMerge branch 'maint-0.4.2'
Nick Mathewson [Tue, 22 Oct 2019 16:13:56 +0000 (12:13 -0400)] 
Merge branch 'maint-0.4.2'

6 years agoMerge branch 'maint-0.4.1' into maint-0.4.2
Nick Mathewson [Tue, 22 Oct 2019 16:13:55 +0000 (12:13 -0400)] 
Merge branch 'maint-0.4.1' into maint-0.4.2

6 years agoMerge remote-tracking branch 'tor-github/pr/1302' into maint-0.4.1
Nick Mathewson [Tue, 22 Oct 2019 16:13:47 +0000 (12:13 -0400)] 
Merge remote-tracking branch 'tor-github/pr/1302' into maint-0.4.1

6 years agoMerge branch 'maint-0.4.2'
Nick Mathewson [Tue, 22 Oct 2019 16:11:59 +0000 (12:11 -0400)] 
Merge branch 'maint-0.4.2'

6 years agoMerge branch 'maint-0.4.1' into maint-0.4.2
Nick Mathewson [Tue, 22 Oct 2019 16:11:59 +0000 (12:11 -0400)] 
Merge branch 'maint-0.4.1' into maint-0.4.2

6 years agoMerge remote-tracking branch 'tor-github/pr/1346' into maint-0.4.1
Nick Mathewson [Tue, 22 Oct 2019 16:11:50 +0000 (12:11 -0400)] 
Merge remote-tracking branch 'tor-github/pr/1346' into maint-0.4.1

6 years agoMerge branch 'maint-0.3.5' into maint-0.4.0
Nick Mathewson [Tue, 22 Oct 2019 16:10:30 +0000 (12:10 -0400)] 
Merge branch 'maint-0.3.5' into maint-0.4.0

6 years agoMerge branch 'maint-0.4.2'
Nick Mathewson [Tue, 22 Oct 2019 16:10:30 +0000 (12:10 -0400)] 
Merge branch 'maint-0.4.2'

6 years agoMerge branch 'maint-0.4.1' into maint-0.4.2
Nick Mathewson [Tue, 22 Oct 2019 16:10:30 +0000 (12:10 -0400)] 
Merge branch 'maint-0.4.1' into maint-0.4.2

6 years agoMerge branch 'maint-0.4.0' into maint-0.4.1
Nick Mathewson [Tue, 22 Oct 2019 16:10:30 +0000 (12:10 -0400)] 
Merge branch 'maint-0.4.0' into maint-0.4.1

6 years agoMerge remote-tracking branch 'tor-github/pr/1376' into maint-0.3.5
Nick Mathewson [Tue, 22 Oct 2019 16:10:08 +0000 (12:10 -0400)] 
Merge remote-tracking branch 'tor-github/pr/1376' into maint-0.3.5

6 years agoMerge branch 'maint-0.4.2'
Nick Mathewson [Tue, 22 Oct 2019 16:08:53 +0000 (12:08 -0400)] 
Merge branch 'maint-0.4.2'

6 years agoMerge branch 'maint-0.4.1' into maint-0.4.2
Nick Mathewson [Tue, 22 Oct 2019 16:08:53 +0000 (12:08 -0400)] 
Merge branch 'maint-0.4.1' into maint-0.4.2

6 years agoMerge remote-tracking branch 'tor-github/pr/1385' into maint-0.4.1
Nick Mathewson [Tue, 22 Oct 2019 16:08:46 +0000 (12:08 -0400)] 
Merge remote-tracking branch 'tor-github/pr/1385' into maint-0.4.1

6 years agoMerge remote-tracking branch 'tor-github/pr/1417'
Nick Mathewson [Tue, 22 Oct 2019 12:36:32 +0000 (08:36 -0400)] 
Merge remote-tracking branch 'tor-github/pr/1417'

6 years agoSimplify CHECK_DEFAULT() logic a little further.
Nick Mathewson [Tue, 22 Oct 2019 12:32:33 +0000 (08:32 -0400)] 
Simplify CHECK_DEFAULT() logic a little further.

Since each of these tests only applies to testing networks, put them
all into a single block that checks for testing networks.

(I recommend reviewing with the "diff -b" option, since the change
is mostly indentation.)

6 years agoMake options_validate() no longer use its "defaults" argument.
Nick Mathewson [Tue, 22 Oct 2019 12:27:13 +0000 (08:27 -0400)] 
Make options_validate() no longer use its "defaults" argument.

It can just look at what the defaults are.

Closes ticket 32185.

6 years agoMerge branch 'bug32175'
Nick Mathewson [Tue, 22 Oct 2019 11:51:30 +0000 (07:51 -0400)] 
Merge branch 'bug32175'

6 years agoMerge branch 'from_setconf_removal_squashed'
Nick Mathewson [Tue, 22 Oct 2019 11:50:42 +0000 (07:50 -0400)] 
Merge branch 'from_setconf_removal_squashed'

6 years agochanges file for 31999
Nick Mathewson [Mon, 21 Oct 2019 16:07:44 +0000 (12:07 -0400)] 
changes file for 31999

6 years agoExtract log-granularity code into its own function.
Nick Mathewson [Mon, 21 Oct 2019 15:58:53 +0000 (11:58 -0400)] 
Extract log-granularity code into its own function.

This pleases practracker.

6 years agoAdd tests for options_init_logs()
Nick Mathewson [Mon, 21 Oct 2019 15:42:40 +0000 (11:42 -0400)] 
Add tests for options_init_logs()

6 years agoMake a pair of add_*_log() functions mockable.
Nick Mathewson [Mon, 21 Oct 2019 15:42:20 +0000 (11:42 -0400)] 
Make a pair of add_*_log() functions mockable.

6 years agoMake options_init_logs STATIC for testing.
Nick Mathewson [Thu, 17 Oct 2019 19:28:07 +0000 (15:28 -0400)] 
Make options_init_logs STATIC for testing.

6 years agoUpdate tests to handle new interpretation of quiet_level.
Nick Mathewson [Thu, 17 Oct 2019 17:23:11 +0000 (13:23 -0400)] 
Update tests to handle new interpretation of quiet_level.

Two things needed to be changed.  First, we used to set quiet_level
to the default (QUIET_NONE) when running tests, since we would not
call anything that acted based upon it.  But since we sometimes call
options_init_logs(), we need to pre-set quiet_level to QUIET_SILENT
in the logs so that we don't add the default logs.  This did not
cause test failure: just unwanted logs.

Second, we had a test that checked whether options_validate was
messing with options->Logs correctly.  Since options_validate no
longer messes with the logs, we no longer want a test for this.

6 years agoRationalize handling of quiet_level in config.c
Nick Mathewson [Thu, 17 Oct 2019 17:13:52 +0000 (13:13 -0400)] 
Rationalize handling of quiet_level in config.c

Formerly, we would use quiet_level as an excuse to rewrite the log
configuration, adding a default log line if none existed, and if
RunAsDaemon was not set, and if we were not being invoked via
setconf (!).

This is against our best practices for several reasons:
  * We should not be changing configured options except when the
    user tells us to do so.
  * We should especially not be changing options in the options_validate
    function.
  * Distinguishing whether we are being called from setconf adds a
    risky special-case.

Instead, this patch take a simpler approach: it changes the
interpretation of having no logging lines set to mean: If there is a
stdout, add a default log based on quiet_level.

Solves ticket 31999.

6 years agoMerge branch 'maint-0.4.2'
teor [Tue, 22 Oct 2019 10:48:26 +0000 (20:48 +1000)] 
Merge branch 'maint-0.4.2'

6 years agoMerge branch 'maint-0.4.1' into maint-0.4.2
teor [Tue, 22 Oct 2019 10:48:20 +0000 (20:48 +1000)] 
Merge branch 'maint-0.4.1' into maint-0.4.2

6 years agoMerge branch 'maint-0.4.0' into maint-0.4.1
teor [Tue, 22 Oct 2019 10:48:13 +0000 (20:48 +1000)] 
Merge branch 'maint-0.4.0' into maint-0.4.1

6 years agoMerge branch 'maint-0.3.5' into maint-0.4.0
teor [Tue, 22 Oct 2019 10:48:05 +0000 (20:48 +1000)] 
Merge branch 'maint-0.3.5' into maint-0.4.0

6 years agoMerge remote-tracking branch 'origin/maint-0.3.5' into maint-0.3.5
teor [Tue, 22 Oct 2019 10:47:44 +0000 (20:47 +1000)] 
Merge remote-tracking branch 'origin/maint-0.3.5' into maint-0.3.5

6 years agoMerge branch 'ticket32177_041' into ticket32177_042
teor [Tue, 22 Oct 2019 09:44:58 +0000 (19:44 +1000)] 
Merge branch 'ticket32177_041' into ticket32177_042

Merge RUST_VERSION from maint-0.4.2 into disabled macOS rust build
from ticket32177_041.

6 years agoMerge branch 'ticket32177_040' into ticket32177_041
teor [Tue, 22 Oct 2019 09:43:38 +0000 (19:43 +1000)] 
Merge branch 'ticket32177_040' into ticket32177_041

6 years agoMerge branch 'ticket32177_035' into ticket32177_040
teor [Tue, 22 Oct 2019 09:43:33 +0000 (19:43 +1000)] 
Merge branch 'ticket32177_035' into ticket32177_040

6 years agoMerge branch 'maint-0.3.5' into ticket32177_035
teor [Tue, 22 Oct 2019 09:43:18 +0000 (19:43 +1000)] 
Merge branch 'maint-0.3.5' into ticket32177_035

6 years agoTravis: Disable the Rust macOS build
teor [Tue, 22 Oct 2019 09:38:50 +0000 (19:38 +1000)] 
Travis: Disable the Rust macOS build

This build was added in 0.3.5.

We need to mitigate slow scheduling of Travis macOS jobs.

Closes ticket 32177.

6 years agoMerge branch 'ticket32177_029' into ticket32177_035
teor [Tue, 22 Oct 2019 09:37:32 +0000 (19:37 +1000)] 
Merge branch 'ticket32177_029' into ticket32177_035

Stem from maint-0.3.5, disabled macOS chutney from ticket32177_029.

6 years agoTravis: Disable all but one macOS build
teor [Tue, 22 Oct 2019 09:34:47 +0000 (19:34 +1000)] 
Travis: Disable all but one macOS build

We need to mitigate slow scheduling of Travis macOS jobs.

Closes ticket 32177.

6 years agoMerge remote-tracking branch 'tor-github/pr/1420'
Nick Mathewson [Mon, 21 Oct 2019 22:45:34 +0000 (18:45 -0400)] 
Merge remote-tracking branch 'tor-github/pr/1420'

6 years agoMerge branch 'maint-0.4.0' into maint-0.4.1
Nick Mathewson [Mon, 21 Oct 2019 22:44:44 +0000 (18:44 -0400)] 
Merge branch 'maint-0.4.0' into maint-0.4.1

6 years agoMerge branch 'maint-0.3.5' into maint-0.4.0
Nick Mathewson [Mon, 21 Oct 2019 22:44:44 +0000 (18:44 -0400)] 
Merge branch 'maint-0.3.5' into maint-0.4.0

6 years agoMerge branch 'maint-0.4.1' into maint-0.4.2
Nick Mathewson [Mon, 21 Oct 2019 22:44:44 +0000 (18:44 -0400)] 
Merge branch 'maint-0.4.1' into maint-0.4.2

6 years agoMerge branch 'maint-0.4.2'
Nick Mathewson [Mon, 21 Oct 2019 22:44:44 +0000 (18:44 -0400)] 
Merge branch 'maint-0.4.2'

6 years agoFix a memory leak introduced by the changes to test_options.c
Nick Mathewson [Mon, 21 Oct 2019 22:28:53 +0000 (18:28 -0400)] 
Fix a memory leak introduced by the changes to test_options.c

Since this code passes the same options to options_validate() more
than once, options_validate() needs to be prepared for that.  (This
previously worked by accident, since the smartlist of schedulers
wasn't initialized.)

6 years agoFix a memory leak introduced by changes to test_options.c
Nick Mathewson [Mon, 21 Oct 2019 22:28:08 +0000 (18:28 -0400)] 
Fix a memory leak introduced by changes to test_options.c

Since the FirewallPorts smartlist is now initialized, we can't just
overwrite it.

6 years agoFix up some Windows CI issues.
Nick Mathewson [Mon, 21 Oct 2019 19:31:56 +0000 (15:31 -0400)] 
Fix up some Windows CI issues.

6 years agoChanges file for 32175 (test_options.c cleanup)
Nick Mathewson [Mon, 21 Oct 2019 18:46:04 +0000 (14:46 -0400)] 
Changes file for 32175 (test_options.c cleanup)

6 years agotest_options.c: Remove TEST_OPTIONS_DEFAULT_VALUES
Nick Mathewson [Mon, 21 Oct 2019 18:41:27 +0000 (14:41 -0400)] 
test_options.c: Remove TEST_OPTIONS_DEFAULT_VALUES

This finally became the empty string, since we no longer have to do
anything in individual test_options.c tests to make "" be a valid
set of options.  Now we can remove it at last.

6 years agoStop overriding ConnLimit in tests.
Nick Mathewson [Mon, 21 Oct 2019 18:14:49 +0000 (14:14 -0400)] 
Stop overriding ConnLimit in tests.

Now that ConnLimit is set to the default value in the
testing helper functions, the individual tests don't all need to
make sure it is set to something valid.

6 years agotest_options.c: remove weird usage of ConnLimit
Nick Mathewson [Mon, 21 Oct 2019 18:11:07 +0000 (14:11 -0400)] 
test_options.c: remove weird usage of ConnLimit

Several of our tests assumed that ConnLimit would be set to 0 by
default, causing the default options not to be parseable.  These
tests had nothing to do with ConnLimit.

6 years agoStop overriding MaxClientCircuitsPending in tests.
Nick Mathewson [Mon, 21 Oct 2019 18:14:49 +0000 (14:14 -0400)] 
Stop overriding MaxClientCircuitsPending in tests.

Now that MaxClientCircuitsPending is set to the default value in the
testing helper functions, the individual tests don't all need to
make sure it is set to something valid.

6 years agotest_options.c: remove weird usage of MaxClientCircuitsPending
Nick Mathewson [Mon, 21 Oct 2019 18:11:07 +0000 (14:11 -0400)] 
test_options.c: remove weird usage of MaxClientCircuitsPending

Several of our tests assumed that MaxClientCircuitsPending would be
set to 0 by default, causing the default options not to be
parseable.  These tests had nothing to do with
MaxClientCircuitsPending.

6 years agoStop overriding KeepalivePeriod in tests.
Nick Mathewson [Mon, 21 Oct 2019 18:14:49 +0000 (14:14 -0400)] 
Stop overriding KeepalivePeriod in tests.

Now that KeepalivePeriod is set to the default value in the testing
helper functions, the individual tests don't all need to make sure
it is set to something valid.

6 years agotest_options.c: remove weird usage of KeepalivePeriod.
Nick Mathewson [Mon, 21 Oct 2019 18:11:07 +0000 (14:11 -0400)] 
test_options.c: remove weird usage of KeepalivePeriod.

Several of our tests assumed that KeepalivePeriod would be set to 0
by default, causing the default options not to be parseable.  These
tests had nothing to do with KeepalivePeriod.

6 years agoRemove a lot of cruft from TEST_OPTIONS_DEFAULT_VALUES.
Nick Mathewson [Mon, 21 Oct 2019 18:05:07 +0000 (14:05 -0400)] 
Remove a lot of cruft from TEST_OPTIONS_DEFAULT_VALUES.

This macro used to have a big list of "default" values that we
needed to set in the test_options tests in order to have reasonable
behavior.  But now that we initialize options objects to the default
settings in these tests, we no longer need such a long list of
things to replace.

6 years agotest_options: use testing options with (almost) real defaults.
Nick Mathewson [Mon, 21 Oct 2019 18:00:06 +0000 (14:00 -0400)] 
test_options: use testing options with (almost) real defaults.

Previously, we just used options set to all 0s, but this causes some
pretty severe workarounds throughout the code, as our options fail
to validate, or count as "default" for the wrong reasons.

Note that in some places, we stop getting spurious warnings or
failures which the tests previously demanded.  In these cases, I've
changed the test behavior.

Fixes 32175.

6 years agoroutermode.h: turn a comment into a doxygen comment.
Nick Mathewson [Mon, 21 Oct 2019 16:47:17 +0000 (12:47 -0400)] 
routermode.h: turn a comment into a doxygen comment.

6 years agoMerge remote-tracking branch 'tor-github/pr/1430'
Nick Mathewson [Mon, 21 Oct 2019 16:43:26 +0000 (12:43 -0400)] 
Merge remote-tracking branch 'tor-github/pr/1430'

6 years agorespect accountingmax during soft hibernation
Roger Dingledine [Mon, 21 Oct 2019 08:14:42 +0000 (04:14 -0400)] 
respect accountingmax during soft hibernation

Relays now respect their AccountingMax bandwidth again. When relays
entered "soft" hibernation (which typically starts when we've hit
90% of our AccountingMax), we had stopped checking whether we should
enter hard hibernation. Soft hibernation refuses new connections and
new circuits, but the existing circuits can continue, meaning that
relays could have exceeded their configured AccountingMax.

This commit rolls back some of the cpu-saving fixes, where we tried
to avoid calling so many of our events while we're off the network.

That's because PERIODIC_EVENT_FLAG_NEED_NET checks net_is_disabled(),
which returns true even if we're only in soft hibernation.

Fixes bug 32108; bugfix on 0.4.0.1-alpha.

6 years agoMerge remote-tracking branch 'tor-github/pr/1434'
teor [Mon, 21 Oct 2019 05:24:22 +0000 (15:24 +1000)] 
Merge remote-tracking branch 'tor-github/pr/1434'

6 years agotest/getinfo: Remove unnecessary test code
teor [Mon, 21 Oct 2019 04:18:54 +0000 (14:18 +1000)] 
test/getinfo: Remove unnecessary test code

Fix for 31684.

6 years agocontrol/getinfo: Use standard error handling
teor [Mon, 21 Oct 2019 03:49:44 +0000 (13:49 +1000)] 
control/getinfo: Use standard error handling

Use BUG() for coding errors, and `< 0` for error checks.

Fix to 31684.

6 years agoFix changes file and string typos
teor [Mon, 21 Oct 2019 03:48:25 +0000 (13:48 +1000)] 
Fix changes file and string typos

Part of 31684.