Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mike Perry
Tor
Commits
946ebd84
Commit
946ebd84
authored
Jan 31, 2018
by
Nick Mathewson
👁
Browse files
Obsolete the now-unused MaxTries options.
parent
c0024edd
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/or/config.c
View file @
946ebd84
...
...
@@ -630,15 +630,12 @@ static config_var_t option_vars_[] = {
"0, 30, 90, 600, 3600, 10800, 25200, 54000, 111600, 262800"
),
V
(
TestingClientMaxIntervalWithoutRequest
,
INTERVAL
,
"10 minutes"
),
V
(
TestingDirConnectionMaxStall
,
INTERVAL
,
"5 minutes"
),
V
(
TestingConsensusMaxDownloadTries
,
UINT
,
"8"
),
/* Since we try connections rapidly and simultaneously, we can afford
* to give up earlier. (This protects against overloading directories.) */
V
(
ClientBootstrapConsensusMaxDownloadTries
,
UINT
,
"7"
),
/* We want to give up much earlier if we're only using authorities. */
V
(
ClientBootstrapConsensusAuthorityOnlyMaxDownloadTries
,
UINT
,
"4"
),
V
(
TestingDescriptorMaxDownloadTries
,
UINT
,
"8"
),
V
(
TestingMicrodescMaxDownloadTries
,
UINT
,
"8"
),
V
(
TestingCertMaxDownloadTries
,
UINT
,
"8"
),
OBSOLETE
(
"TestingConsensusMaxDownloadTries"
),
OBSOLETE
(
"ClientBootstrapConsensusMaxDownloadTries"
),
OBSOLETE
(
"ClientBootstrapConsensusAuthorityOnlyMaxDownloadTries"
),
OBSOLETE
(
"TestingDescriptorMaxDownloadTries"
),
OBSOLETE
(
"TestingMicrodescMaxDownloadTries"
),
OBSOLETE
(
"TestingCertMaxDownloadTries"
),
V
(
TestingDirAuthVoteExit
,
ROUTERSET
,
NULL
),
V
(
TestingDirAuthVoteExitIsStrict
,
BOOL
,
"0"
),
V
(
TestingDirAuthVoteGuard
,
ROUTERSET
,
NULL
),
...
...
@@ -663,8 +660,6 @@ static const config_var_t testing_tor_network_defaults[] = {
"0, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 16, 32, 60"
),
V
(
ClientBootstrapConsensusAuthorityOnlyDownloadSchedule
,
CSV_INTERVAL
,
"0, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 16, 32, 60"
),
V
(
ClientBootstrapConsensusMaxDownloadTries
,
UINT
,
"80"
),
V
(
ClientBootstrapConsensusAuthorityOnlyMaxDownloadTries
,
UINT
,
"80"
),
V
(
ClientDNSRejectInternalAddresses
,
BOOL
,
"0"
),
V
(
ClientRejectInternalAddresses
,
BOOL
,
"0"
),
V
(
CountPrivateBandwidth
,
BOOL
,
"1"
),
...
...
@@ -692,10 +687,6 @@ static const config_var_t testing_tor_network_defaults[] = {
"15, 20, 30, 60"
),
V
(
TestingClientMaxIntervalWithoutRequest
,
INTERVAL
,
"5 seconds"
),
V
(
TestingDirConnectionMaxStall
,
INTERVAL
,
"30 seconds"
),
V
(
TestingConsensusMaxDownloadTries
,
UINT
,
"80"
),
V
(
TestingDescriptorMaxDownloadTries
,
UINT
,
"80"
),
V
(
TestingMicrodescMaxDownloadTries
,
UINT
,
"80"
),
V
(
TestingCertMaxDownloadTries
,
UINT
,
"80"
),
V
(
TestingEnableConnBwEvent
,
BOOL
,
"1"
),
V
(
TestingEnableCellStatsEvent
,
BOOL
,
"1"
),
V
(
TestingEnableTbEmptyEvent
,
BOOL
,
"1"
),
...
...
@@ -4359,10 +4350,6 @@ options_validate(or_options_t *old_options, or_options_t *options,
CHECK_DEFAULT
(
TestingBridgeBootstrapDownloadSchedule
);
CHECK_DEFAULT
(
TestingClientMaxIntervalWithoutRequest
);
CHECK_DEFAULT
(
TestingDirConnectionMaxStall
);
CHECK_DEFAULT
(
TestingConsensusMaxDownloadTries
);
CHECK_DEFAULT
(
TestingDescriptorMaxDownloadTries
);
CHECK_DEFAULT
(
TestingMicrodescMaxDownloadTries
);
CHECK_DEFAULT
(
TestingCertMaxDownloadTries
);
CHECK_DEFAULT
(
TestingAuthKeyLifetime
);
CHECK_DEFAULT
(
TestingLinkCertLifetime
);
CHECK_DEFAULT
(
TestingSigningKeySlop
);
...
...
@@ -4437,33 +4424,6 @@ options_validate(or_options_t *old_options, or_options_t *options,
COMPLAIN
(
"TestingDirConnectionMaxStall is insanely high."
);
}
if
(
options
->
TestingConsensusMaxDownloadTries
<
2
)
{
REJECT
(
"TestingConsensusMaxDownloadTries must be greater than 2."
);
}
else
if
(
options
->
TestingConsensusMaxDownloadTries
>
800
)
{
COMPLAIN
(
"TestingConsensusMaxDownloadTries is insanely high."
);
}
if
(
options
->
ClientBootstrapConsensusMaxDownloadTries
<
2
)
{
REJECT
(
"ClientBootstrapConsensusMaxDownloadTries must be greater "
"than 2."
);
}
else
if
(
options
->
ClientBootstrapConsensusMaxDownloadTries
>
800
)
{
COMPLAIN
(
"ClientBootstrapConsensusMaxDownloadTries is insanely "
"high."
);
}
if
(
options
->
ClientBootstrapConsensusAuthorityOnlyMaxDownloadTries
<
2
)
{
REJECT
(
"ClientBootstrapConsensusAuthorityOnlyMaxDownloadTries must "
"be greater than 2."
);
}
else
if
(
options
->
ClientBootstrapConsensusAuthorityOnlyMaxDownloadTries
>
800
)
{
COMPLAIN
(
"ClientBootstrapConsensusAuthorityOnlyMaxDownloadTries is "
"insanely high."
);
}
if
(
options
->
ClientBootstrapConsensusMaxInProgressTries
<
1
)
{
REJECT
(
"ClientBootstrapConsensusMaxInProgressTries must be greater "
"than 0."
);
...
...
@@ -4473,24 +4433,6 @@ options_validate(or_options_t *old_options, or_options_t *options,
"high."
);
}
if
(
options
->
TestingDescriptorMaxDownloadTries
<
2
)
{
REJECT
(
"TestingDescriptorMaxDownloadTries must be greater than 1."
);
}
else
if
(
options
->
TestingDescriptorMaxDownloadTries
>
800
)
{
COMPLAIN
(
"TestingDescriptorMaxDownloadTries is insanely high."
);
}
if
(
options
->
TestingMicrodescMaxDownloadTries
<
2
)
{
REJECT
(
"TestingMicrodescMaxDownloadTries must be greater than 1."
);
}
else
if
(
options
->
TestingMicrodescMaxDownloadTries
>
800
)
{
COMPLAIN
(
"TestingMicrodescMaxDownloadTries is insanely high."
);
}
if
(
options
->
TestingCertMaxDownloadTries
<
2
)
{
REJECT
(
"TestingCertMaxDownloadTries must be greater than 1."
);
}
else
if
(
options
->
TestingCertMaxDownloadTries
>
800
)
{
COMPLAIN
(
"TestingCertMaxDownloadTries is insanely high."
);
}
if
(
options
->
TestingEnableConnBwEvent
&&
!
options
->
TestingTorNetwork
&&
!
options
->
UsingTestNetworkDefaults_
)
{
REJECT
(
"TestingEnableConnBwEvent may only be changed in testing "
...
...
src/or/or.h
View file @
946ebd84
...
...
@@ -4397,37 +4397,11 @@ typedef struct {
* it? Only altered on testing networks. */
int
TestingDirConnectionMaxStall
;
/** How many times will we try to fetch a consensus before we give
* up? Only altered on testing networks. */
int
TestingConsensusMaxDownloadTries
;
/** How many times will a client try to fetch a consensus while
* bootstrapping using a list of fallback directories, before it gives up?
* Only altered on testing networks. */
int
ClientBootstrapConsensusMaxDownloadTries
;
/** How many times will a client try to fetch a consensus while
* bootstrapping using only a list of authorities, before it gives up?
* Only altered on testing networks. */
int
ClientBootstrapConsensusAuthorityOnlyMaxDownloadTries
;
/** How many simultaneous in-progress connections will we make when trying
* to fetch a consensus before we wait for one to complete, timeout, or
* error out? Only altered on testing networks. */
int
ClientBootstrapConsensusMaxInProgressTries
;
/** How many times will we try to download a router's descriptor before
* giving up? Only altered on testing networks. */
int
TestingDescriptorMaxDownloadTries
;
/** How many times will we try to download a microdescriptor before
* giving up? Only altered on testing networks. */
int
TestingMicrodescMaxDownloadTries
;
/** How many times will we try to fetch a certificate before giving
* up? Only altered on testing networks. */
int
TestingCertMaxDownloadTries
;
/** If true, we take part in a testing network. Change the defaults of a
* couple of other configuration options and allow to change the values
* of certain configuration options. */
...
...
src/test/test_options.c
View file @
946ebd84
...
...
@@ -377,17 +377,11 @@ fixed_get_uname(void)
}
#define TEST_OPTIONS_OLD_VALUES "TestingV3AuthInitialVotingInterval 1800\n" \
"ClientBootstrapConsensusMaxDownloadTries 7\n" \
"ClientBootstrapConsensusAuthorityOnlyMaxDownloadTries 4\n" \
"ClientBootstrapConsensusMaxInProgressTries 3\n" \
"TestingV3AuthInitialVoteDelay 300\n" \
"TestingV3AuthInitialDistDelay 300\n" \
"TestingClientMaxIntervalWithoutRequest 600\n" \
"TestingDirConnectionMaxStall 600\n" \
"TestingConsensusMaxDownloadTries 8\n" \
"TestingDescriptorMaxDownloadTries 8\n" \
"TestingMicrodescMaxDownloadTries 8\n" \
"TestingCertMaxDownloadTries 8\n"
#define TEST_OPTIONS_DEFAULT_VALUES TEST_OPTIONS_OLD_VALUES \
"MaxClientCircuitsPending 1\n" \
...
...
@@ -2081,10 +2075,6 @@ test_options_validate__testing(void *ignored)
ENSURE_DEFAULT
(
TestingBridgeBootstrapDownloadSchedule
,
3000
);
ENSURE_DEFAULT
(
TestingClientMaxIntervalWithoutRequest
,
3000
);
ENSURE_DEFAULT
(
TestingDirConnectionMaxStall
,
3000
);
ENSURE_DEFAULT
(
TestingConsensusMaxDownloadTries
,
3000
);
ENSURE_DEFAULT
(
TestingDescriptorMaxDownloadTries
,
3000
);
ENSURE_DEFAULT
(
TestingMicrodescMaxDownloadTries
,
3000
);
ENSURE_DEFAULT
(
TestingCertMaxDownloadTries
,
3000
);
ENSURE_DEFAULT
(
TestingAuthKeyLifetime
,
3000
);
ENSURE_DEFAULT
(
TestingLinkCertLifetime
,
3000
);
ENSURE_DEFAULT
(
TestingSigningKeySlop
,
3000
);
...
...
@@ -4069,15 +4059,6 @@ test_options_validate__testing_options(void *ignored)
"is way too low."
);
TEST_TESTING_OPTION
(
TestingDirConnectionMaxStall
,
1
,
3601
,
"is way too low."
);
// TODO: I think this points to a bug/regression in options_validate
TEST_TESTING_OPTION
(
TestingConsensusMaxDownloadTries
,
1
,
801
,
"must be greater than 2."
);
TEST_TESTING_OPTION
(
TestingDescriptorMaxDownloadTries
,
1
,
801
,
"must be greater than 1."
);
TEST_TESTING_OPTION
(
TestingMicrodescMaxDownloadTries
,
1
,
801
,
"must be greater than 1."
);
TEST_TESTING_OPTION
(
TestingCertMaxDownloadTries
,
1
,
801
,
"must be greater than 1."
);
free_options_test_data
(
tdata
);
tdata
=
get_options_test_data
(
TEST_OPTIONS_DEFAULT_VALUES
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment