mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 20:33:31 +01:00
Tweak the bug2250 fix slightly
Rename the _UsingTestingTorNetwork hidden option to _UsingTestNetworkDefaults (thanks Nick for the suggestion) and added a changes file.
This commit is contained in:
parent
34e47d1052
commit
5c7c5e593f
5
changes/bug2250
Normal file
5
changes/bug2250
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
o Minor bugfixes:
|
||||||
|
- Fix an assert that got triggered when using the TestingTorNetwork
|
||||||
|
configuration option and then issuing a GETINFO config-text control
|
||||||
|
command. Fixes bug 2250; bugfix on 0.2.1.2-alpha.
|
||||||
|
|
@ -393,7 +393,7 @@ static config_var_t _option_vars[] = {
|
|||||||
VAR("__HashedControlSessionPassword", LINELIST, HashedControlSessionPassword,
|
VAR("__HashedControlSessionPassword", LINELIST, HashedControlSessionPassword,
|
||||||
NULL),
|
NULL),
|
||||||
V(MinUptimeHidServDirectoryV2, INTERVAL, "24 hours"),
|
V(MinUptimeHidServDirectoryV2, INTERVAL, "24 hours"),
|
||||||
V(_UsingTestingTorNetwork, BOOL, "0"),
|
V(_UsingTestNetworkDefaults, BOOL, "0"),
|
||||||
|
|
||||||
{ NULL, CONFIG_TYPE_OBSOLETE, 0, NULL }
|
{ NULL, CONFIG_TYPE_OBSOLETE, 0, NULL }
|
||||||
};
|
};
|
||||||
@ -419,7 +419,7 @@ static config_var_t testing_tor_network_defaults[] = {
|
|||||||
V(TestingAuthDirTimeToLearnReachability, INTERVAL, "0 minutes"),
|
V(TestingAuthDirTimeToLearnReachability, INTERVAL, "0 minutes"),
|
||||||
V(TestingEstimatedDescriptorPropagationTime, INTERVAL, "0 minutes"),
|
V(TestingEstimatedDescriptorPropagationTime, INTERVAL, "0 minutes"),
|
||||||
V(MinUptimeHidServDirectoryV2, INTERVAL, "0 minutes"),
|
V(MinUptimeHidServDirectoryV2, INTERVAL, "0 minutes"),
|
||||||
V(_UsingTestingTorNetwork, BOOL, "1"),
|
V(_UsingTestNetworkDefaults, BOOL, "1"),
|
||||||
{ NULL, CONFIG_TYPE_OBSOLETE, 0, NULL }
|
{ NULL, CONFIG_TYPE_OBSOLETE, 0, NULL }
|
||||||
};
|
};
|
||||||
#undef VAR
|
#undef VAR
|
||||||
@ -3657,7 +3657,7 @@ options_validate(or_options_t *old_options, or_options_t *options,
|
|||||||
/* Keep changes to hard-coded values synchronous to man page and default
|
/* Keep changes to hard-coded values synchronous to man page and default
|
||||||
* values table. */
|
* values table. */
|
||||||
if (options->TestingV3AuthInitialVotingInterval != 30*60 &&
|
if (options->TestingV3AuthInitialVotingInterval != 30*60 &&
|
||||||
!options->TestingTorNetwork && !options->_UsingTestingTorNetwork) {
|
!options->TestingTorNetwork && !options->_UsingTestNetworkDefaults) {
|
||||||
REJECT("TestingV3AuthInitialVotingInterval may only be changed in testing "
|
REJECT("TestingV3AuthInitialVotingInterval may only be changed in testing "
|
||||||
"Tor networks!");
|
"Tor networks!");
|
||||||
} else if (options->TestingV3AuthInitialVotingInterval < MIN_VOTE_INTERVAL) {
|
} else if (options->TestingV3AuthInitialVotingInterval < MIN_VOTE_INTERVAL) {
|
||||||
@ -3668,7 +3668,7 @@ options_validate(or_options_t *old_options, or_options_t *options,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (options->TestingV3AuthInitialVoteDelay != 5*60 &&
|
if (options->TestingV3AuthInitialVoteDelay != 5*60 &&
|
||||||
!options->TestingTorNetwork && !options->_UsingTestingTorNetwork) {
|
!options->TestingTorNetwork && !options->_UsingTestNetworkDefaults) {
|
||||||
|
|
||||||
REJECT("TestingV3AuthInitialVoteDelay may only be changed in testing "
|
REJECT("TestingV3AuthInitialVoteDelay may only be changed in testing "
|
||||||
"Tor networks!");
|
"Tor networks!");
|
||||||
@ -3677,7 +3677,7 @@ options_validate(or_options_t *old_options, or_options_t *options,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (options->TestingV3AuthInitialDistDelay != 5*60 &&
|
if (options->TestingV3AuthInitialDistDelay != 5*60 &&
|
||||||
!options->TestingTorNetwork && !options->_UsingTestingTorNetwork) {
|
!options->TestingTorNetwork && !options->_UsingTestNetworkDefaults) {
|
||||||
REJECT("TestingV3AuthInitialDistDelay may only be changed in testing "
|
REJECT("TestingV3AuthInitialDistDelay may only be changed in testing "
|
||||||
"Tor networks!");
|
"Tor networks!");
|
||||||
} else if (options->TestingV3AuthInitialDistDelay < MIN_DIST_SECONDS) {
|
} else if (options->TestingV3AuthInitialDistDelay < MIN_DIST_SECONDS) {
|
||||||
@ -3692,7 +3692,7 @@ options_validate(or_options_t *old_options, or_options_t *options,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (options->TestingAuthDirTimeToLearnReachability != 30*60 &&
|
if (options->TestingAuthDirTimeToLearnReachability != 30*60 &&
|
||||||
!options->TestingTorNetwork && !options->_UsingTestingTorNetwork) {
|
!options->TestingTorNetwork && !options->_UsingTestNetworkDefaults) {
|
||||||
REJECT("TestingAuthDirTimeToLearnReachability may only be changed in "
|
REJECT("TestingAuthDirTimeToLearnReachability may only be changed in "
|
||||||
"testing Tor networks!");
|
"testing Tor networks!");
|
||||||
} else if (options->TestingAuthDirTimeToLearnReachability < 0) {
|
} else if (options->TestingAuthDirTimeToLearnReachability < 0) {
|
||||||
@ -3702,7 +3702,7 @@ options_validate(or_options_t *old_options, or_options_t *options,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (options->TestingEstimatedDescriptorPropagationTime != 10*60 &&
|
if (options->TestingEstimatedDescriptorPropagationTime != 10*60 &&
|
||||||
!options->TestingTorNetwork && !options->_UsingTestingTorNetwork) {
|
!options->TestingTorNetwork && !options->_UsingTestNetworkDefaults) {
|
||||||
REJECT("TestingEstimatedDescriptorPropagationTime may only be changed in "
|
REJECT("TestingEstimatedDescriptorPropagationTime may only be changed in "
|
||||||
"testing Tor networks!");
|
"testing Tor networks!");
|
||||||
} else if (options->TestingEstimatedDescriptorPropagationTime < 0) {
|
} else if (options->TestingEstimatedDescriptorPropagationTime < 0) {
|
||||||
|
@ -2844,7 +2844,7 @@ typedef struct {
|
|||||||
/** Set to true if the TestingTorNetwork configuration option is set.
|
/** Set to true if the TestingTorNetwork configuration option is set.
|
||||||
* This is used so that options_validate() has a chance to realize that
|
* This is used so that options_validate() has a chance to realize that
|
||||||
* the defaults have changed. */
|
* the defaults have changed. */
|
||||||
int _UsingTestingTorNetwork;
|
int _UsingTestNetworkDefaults;
|
||||||
|
|
||||||
} or_options_t;
|
} or_options_t;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user