mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 15:43:32 +01:00
Merge branch 'maint-0.2.8'
This commit is contained in:
commit
58e0e587a6
5
changes/bug19003
Normal file
5
changes/bug19003
Normal file
@ -0,0 +1,5 @@
|
||||
o Minor bugfixes (small networks):
|
||||
- Allow directories in small networks to bootstrap by
|
||||
skipping DirPort checks when the consensus has no exits.
|
||||
Resolves #19003, bugfix on #18050 in 0.2.8.1-alpha.
|
||||
Patch by teor.
|
@ -1674,7 +1674,11 @@ circuit_launch(uint8_t purpose, int flags)
|
||||
return circuit_launch_by_extend_info(purpose, NULL, flags);
|
||||
}
|
||||
|
||||
/* DOCDOC */
|
||||
/* Do we have enough descriptors to build paths?
|
||||
* If need_exit is true, return 1 if we can build exit paths.
|
||||
* (We need at least one Exit in the consensus to build exit paths.)
|
||||
* If need_exit is false, return 1 if we can build internal paths.
|
||||
*/
|
||||
static int
|
||||
have_enough_path_info(int need_exit)
|
||||
{
|
||||
|
@ -1549,8 +1549,10 @@ proxy_mode(const or_options_t *options)
|
||||
* and
|
||||
* - We have ORPort set
|
||||
* and
|
||||
* - We believe both our ORPort and DirPort (if present) are reachable from
|
||||
* - We believe our ORPort and DirPort (if present) are reachable from
|
||||
* the outside; or
|
||||
* - We believe our ORPort is reachable from the outside, and we can't
|
||||
* check our DirPort because the consensus has no exits; or
|
||||
* - We are an authoritative directory server.
|
||||
*/
|
||||
static int
|
||||
@ -1568,8 +1570,15 @@ decide_if_publishable_server(void)
|
||||
return 1;
|
||||
if (!router_get_advertised_or_port(options))
|
||||
return 0;
|
||||
|
||||
return check_whether_orport_reachable() && check_whether_dirport_reachable();
|
||||
if (!check_whether_orport_reachable())
|
||||
return 0;
|
||||
if (router_have_consensus_path() == CONSENSUS_PATH_INTERNAL) {
|
||||
/* All set: there are no exits in the consensus (maybe this is a tiny
|
||||
* test network), so we can't check our DirPort reachability. */
|
||||
return 1;
|
||||
} else {
|
||||
return check_whether_dirport_reachable();
|
||||
}
|
||||
}
|
||||
|
||||
/** Initiate server descriptor upload as reasonable (if server is publishable,
|
||||
|
Loading…
Reference in New Issue
Block a user