mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 05:03:43 +01:00
Servers that don't know their own IP address should go to the
authorities for their first directory fetch, even if their DirPort is off or if they don't know they're reachable yet. This will help them bootstrap better. Bugfix on 0.2.0.18-alpha; fixes bug 609. svn:r13688
This commit is contained in:
parent
7feff8b481
commit
31f72a3d80
@ -30,6 +30,10 @@ Changes in version 0.2.0.20-?? - 2008-02-??
|
|||||||
- Fix code used to find strings within buffers, when those strings
|
- Fix code used to find strings within buffers, when those strings
|
||||||
are not in the first chunk of the buffer.
|
are not in the first chunk of the buffer.
|
||||||
- Fix potential segfault when parsing HTTP headers. Bugfix on 0.2.0.x.
|
- Fix potential segfault when parsing HTTP headers. Bugfix on 0.2.0.x.
|
||||||
|
- Servers that don't know their own IP address should go to the
|
||||||
|
authorities for their first directory fetch, even if their DirPort
|
||||||
|
is off or if they don't know they're reachable yet. This will help
|
||||||
|
them bootstrap better. Bugfix on 0.2.0.18-alpha; fixes bug 609.
|
||||||
|
|
||||||
o Minor features (performance):
|
o Minor features (performance):
|
||||||
- Tune parameters for cell pool allocation to minimize amount of
|
- Tune parameters for cell pool allocation to minimize amount of
|
||||||
|
@ -1118,12 +1118,15 @@ int
|
|||||||
directory_fetches_from_authorities(or_options_t *options)
|
directory_fetches_from_authorities(or_options_t *options)
|
||||||
{
|
{
|
||||||
routerinfo_t *me;
|
routerinfo_t *me;
|
||||||
|
uint32_t addr;
|
||||||
if (options->FetchDirInfoEarly)
|
if (options->FetchDirInfoEarly)
|
||||||
return 1;
|
return 1;
|
||||||
if (options->DirPort == 0)
|
|
||||||
return 0;
|
|
||||||
if (options->BridgeRelay == 1)
|
if (options->BridgeRelay == 1)
|
||||||
return 0;
|
return 0;
|
||||||
|
if (server_mode(options) && router_pick_published_address(options, &addr)<0)
|
||||||
|
return 1; /* we don't know our IP address; ask an authority. */
|
||||||
|
if (options->DirPort == 0)
|
||||||
|
return 0;
|
||||||
if (!server_mode(options) || !advertised_server_mode())
|
if (!server_mode(options) || !advertised_server_mode())
|
||||||
return 0;
|
return 0;
|
||||||
me = router_get_my_routerinfo();
|
me = router_get_my_routerinfo();
|
||||||
|
@ -1160,9 +1160,10 @@ static smartlist_t *warned_nonexistent_family = NULL;
|
|||||||
|
|
||||||
static int router_guess_address_from_dir_headers(uint32_t *guess);
|
static int router_guess_address_from_dir_headers(uint32_t *guess);
|
||||||
|
|
||||||
/** Return our current best guess at our address, either because
|
/** Make a current best guess at our address, either because
|
||||||
* it's configured in torrc, or because we've learned it from
|
* it's configured in torrc, or because we've learned it from
|
||||||
* dirserver headers. */
|
* dirserver headers. Place the answer in *<b>addr</b> and return
|
||||||
|
* 0 on success, else return -1 if we have no guess. */
|
||||||
int
|
int
|
||||||
router_pick_published_address(or_options_t *options, uint32_t *addr)
|
router_pick_published_address(or_options_t *options, uint32_t *addr)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user