mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-25 07:07:52 +01:00
Merge remote branch 'origin/maint-0.2.2'
Trivial conflicts fixed in or.h Conflicts: src/or/or.h
This commit is contained in:
commit
63651b9191
3 changed files with 18 additions and 5 deletions
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.
|
||||
|
|
@ -402,6 +402,7 @@ static config_var_t _option_vars[] = {
|
|||
VAR("__HashedControlSessionPassword", LINELIST, HashedControlSessionPassword,
|
||||
NULL),
|
||||
V(MinUptimeHidServDirectoryV2, INTERVAL, "24 hours"),
|
||||
V(_UsingTestNetworkDefaults, BOOL, "0"),
|
||||
|
||||
{ NULL, CONFIG_TYPE_OBSOLETE, 0, NULL }
|
||||
};
|
||||
|
@ -427,6 +428,7 @@ static config_var_t testing_tor_network_defaults[] = {
|
|||
V(TestingAuthDirTimeToLearnReachability, INTERVAL, "0 minutes"),
|
||||
V(TestingEstimatedDescriptorPropagationTime, INTERVAL, "0 minutes"),
|
||||
V(MinUptimeHidServDirectoryV2, INTERVAL, "0 minutes"),
|
||||
V(_UsingTestNetworkDefaults, BOOL, "1"),
|
||||
{ NULL, CONFIG_TYPE_OBSOLETE, 0, NULL }
|
||||
};
|
||||
#undef VAR
|
||||
|
@ -3728,7 +3730,7 @@ options_validate(or_options_t *old_options, or_options_t *options,
|
|||
/* Keep changes to hard-coded values synchronous to man page and default
|
||||
* values table. */
|
||||
if (options->TestingV3AuthInitialVotingInterval != 30*60 &&
|
||||
!options->TestingTorNetwork) {
|
||||
!options->TestingTorNetwork && !options->_UsingTestNetworkDefaults) {
|
||||
REJECT("TestingV3AuthInitialVotingInterval may only be changed in testing "
|
||||
"Tor networks!");
|
||||
} else if (options->TestingV3AuthInitialVotingInterval < MIN_VOTE_INTERVAL) {
|
||||
|
@ -3739,7 +3741,8 @@ options_validate(or_options_t *old_options, or_options_t *options,
|
|||
}
|
||||
|
||||
if (options->TestingV3AuthInitialVoteDelay != 5*60 &&
|
||||
!options->TestingTorNetwork) {
|
||||
!options->TestingTorNetwork && !options->_UsingTestNetworkDefaults) {
|
||||
|
||||
REJECT("TestingV3AuthInitialVoteDelay may only be changed in testing "
|
||||
"Tor networks!");
|
||||
} else if (options->TestingV3AuthInitialVoteDelay < MIN_VOTE_SECONDS) {
|
||||
|
@ -3747,7 +3750,7 @@ options_validate(or_options_t *old_options, or_options_t *options,
|
|||
}
|
||||
|
||||
if (options->TestingV3AuthInitialDistDelay != 5*60 &&
|
||||
!options->TestingTorNetwork) {
|
||||
!options->TestingTorNetwork && !options->_UsingTestNetworkDefaults) {
|
||||
REJECT("TestingV3AuthInitialDistDelay may only be changed in testing "
|
||||
"Tor networks!");
|
||||
} else if (options->TestingV3AuthInitialDistDelay < MIN_DIST_SECONDS) {
|
||||
|
@ -3762,7 +3765,7 @@ options_validate(or_options_t *old_options, or_options_t *options,
|
|||
}
|
||||
|
||||
if (options->TestingAuthDirTimeToLearnReachability != 30*60 &&
|
||||
!options->TestingTorNetwork) {
|
||||
!options->TestingTorNetwork && !options->_UsingTestNetworkDefaults) {
|
||||
REJECT("TestingAuthDirTimeToLearnReachability may only be changed in "
|
||||
"testing Tor networks!");
|
||||
} else if (options->TestingAuthDirTimeToLearnReachability < 0) {
|
||||
|
@ -3772,7 +3775,7 @@ options_validate(or_options_t *old_options, or_options_t *options,
|
|||
}
|
||||
|
||||
if (options->TestingEstimatedDescriptorPropagationTime != 10*60 &&
|
||||
!options->TestingTorNetwork) {
|
||||
!options->TestingTorNetwork && !options->_UsingTestNetworkDefaults) {
|
||||
REJECT("TestingEstimatedDescriptorPropagationTime may only be changed in "
|
||||
"testing Tor networks!");
|
||||
} else if (options->TestingEstimatedDescriptorPropagationTime < 0) {
|
||||
|
|
|
@ -3014,6 +3014,11 @@ typedef struct {
|
|||
/** For testing only: will go away in 0.2.3.x. */
|
||||
int _UseFilteringSSLBufferevents;
|
||||
|
||||
/** Set to true if the TestingTorNetwork configuration option is set.
|
||||
* This is used so that options_validate() has a chance to realize that
|
||||
* the defaults have changed. */
|
||||
int _UsingTestNetworkDefaults;
|
||||
|
||||
} or_options_t;
|
||||
|
||||
/** Persistent state for an onion router, as saved to disk. */
|
||||
|
|
Loading…
Add table
Reference in a new issue