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
3b41551b
Commit
3b41551b
authored
Jun 17, 2011
by
Nick Mathewson
👁
Browse files
Revert "Add an "auto" option to UseBridges"
This reverts commit
507c1257
.
parent
cabb16ca
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/or/config.c
View file @
3b41551b
...
...
@@ -376,7 +376,7 @@ static config_var_t _option_vars[] = {
V
(
TransPort
,
PORT
,
"0"
),
V
(
TunnelDirConns
,
BOOL
,
"1"
),
V
(
UpdateBridgesFromAuthority
,
BOOL
,
"0"
),
V
AR
(
"
UseBridges
"
,
STRING
,
UseBridges_
,
"auto
"
),
V
(
UseBridges
,
BOOL
,
"0
"
),
V
(
UseEntryGuards
,
BOOL
,
"1"
),
V
(
User
,
STRING
,
NULL
),
VAR
(
"V1AuthoritativeDirectory"
,
BOOL
,
V1AuthoritativeDir
,
"0"
),
...
...
@@ -3234,19 +3234,6 @@ options_validate(or_options_t *old_options, or_options_t *options,
"of the Internet, so they must not set Reachable*Addresses "
"or FascistFirewall."
);
/* XXX023 use autobool instead. */
if
(
!
strcmp
(
options
->
UseBridges_
,
"auto"
))
{
options
->
UseBridges
=
(
options
->
Bridges
&&
!
server_mode
(
options
)
&&
!
options
->
EntryNodes
);
}
else
if
(
!
strcmp
(
options
->
UseBridges_
,
"0"
))
{
options
->
UseBridges
=
0
;
}
else
if
(
!
strcmp
(
options
->
UseBridges_
,
"1"
))
{
options
->
UseBridges
=
1
;
}
else
{
REJECT
(
"UseBridges must be 0, 1, or auto"
);
}
if
(
options
->
UseBridges
&&
server_mode
(
options
))
REJECT
(
"Servers must be able to freely connect to the rest "
...
...
@@ -3581,8 +3568,10 @@ options_validate(or_options_t *old_options, or_options_t *options,
if
(
validate_dir_authorities
(
options
,
old_options
)
<
0
)
REJECT
(
"Directory authority line did not parse. See logs for details."
);
if
(
options
->
UseBridges
&&
!
options
->
Bridges
)
REJECT
(
"If you set UseBridges, you must specify at least one bridge."
);
if
(
options
->
UseBridges
&&
!
options
->
TunnelDirConns
)
REJECT
(
"
TunnelDirConns set to 0 only works with UseBridges set to 0
"
);
REJECT
(
"
If you set UseBridges, you must set TunnelDirConns.
"
);
if
(
options
->
Bridges
)
{
for
(
cl
=
options
->
Bridges
;
cl
;
cl
=
cl
->
next
)
{
if
(
parse_bridge_line
(
cl
->
value
,
1
)
<
0
)
...
...
src/or/or.h
View file @
3b41551b
...
...
@@ -2480,17 +2480,7 @@ typedef struct {
* when doing so. */
char
*
BridgePassword
;
/** Whether we should start all circuits with a bridge. "1" means strictly
* yes, "0" means strictly no, and "auto" means that we do iff any bridges
* are configured, we are not running a server and have not specified a list
* of entry nodes. */
char
*
UseBridges_
;
/** Effective value of UseBridges. Will be set equally for UseBridges set to
* 1 or 0, but for 'auto' it will be set to 1 iff any bridges are
* configured, we are not running a server and have not specified a list of
* entry nodes. */
int
UseBridges
;
int
UseBridges
;
/**< Boolean: should we start all circuits with a bridge? */
config_line_t
*
Bridges
;
/**< List of bootstrap bridge addresses. */
int
BridgeRelay
;
/**< Boolean: are we acting as a bridge relay? We make
...
...
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