mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
fix assert: if our dirport isn't reachable yet, don't trick
*ourselves* into thinking the dirport is zero. but continue to tell other people that it is. svn:r3952
This commit is contained in:
parent
cd25e56ad2
commit
a28ae7a70c
@ -680,7 +680,7 @@ int router_rebuild_descriptor(int force) {
|
||||
ri->nickname = tor_strdup(options->Nickname);
|
||||
ri->addr = addr;
|
||||
ri->or_port = options->ORPort;
|
||||
ri->dir_port = (hibernating || !check_whether_dirport_reachable()) ?
|
||||
ri->dir_port = hibernating ?
|
||||
0 : options->DirPort;
|
||||
ri->published_on = time(NULL);
|
||||
ri->onion_pkey = crypto_pk_dup_key(get_onion_key()); /* must invoke from main thread */
|
||||
@ -830,7 +830,7 @@ int router_dump_router_to_string(char *s, size_t maxlen, routerinfo_t *router,
|
||||
router->nickname,
|
||||
router->address,
|
||||
router->or_port,
|
||||
router->dir_port,
|
||||
check_whether_dirport_reachable ? router->dir_port : 0,
|
||||
router->platform,
|
||||
published,
|
||||
fingerprint,
|
||||
|
Loading…
Reference in New Issue
Block a user