diff options
author | Roger Dingledine <arma@torproject.org> | 2005-07-15 18:49:35 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2005-07-15 18:49:35 +0000 |
commit | 97174b67c2c8ad7a1df3d8904546e5851b046244 (patch) | |
tree | 2572da78ece2efdd1d7f9145b324650d7ea1786c /src/or/router.c | |
parent | 83dc42055d851e24bc21ae3fe951943724dc252d (diff) | |
download | tor-97174b67c2c8ad7a1df3d8904546e5851b046244.tar.gz tor-97174b67c2c8ad7a1df3d8904546e5851b046244.zip |
if you're an auth dir server, always publish your dirport,
even if you haven't yet found yourself to be reachable.
this is the cause of Jan Tore Morken's recent or-talk bug.
svn:r4575
Diffstat (limited to 'src/or/router.c')
-rw-r--r-- | src/or/router.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/or/router.c b/src/or/router.c index 3fc46408f7..cbdd35731b 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -830,6 +830,7 @@ router_dump_router_to_string(char *s, size_t maxlen, routerinfo_t *router, const char *cp; routerinfo_t *ri_tmp; #endif + or_options_t *options = get_options(); /* Make sure the identity key matches the one in the routerinfo. */ if (crypto_pk_cmp_keys(ident_key, router->identity_pkey)) { @@ -888,7 +889,8 @@ router_dump_router_to_string(char *s, size_t maxlen, routerinfo_t *router, router->nickname, router->address, router->or_port, - check_whether_dirport_reachable() ? router->dir_port : 0, + (authdir_mode(options) || check_whether_dirport_reachable()) ? + router->dir_port : 0, router->platform, published, fingerprint, @@ -909,9 +911,9 @@ router_dump_router_to_string(char *s, size_t maxlen, routerinfo_t *router, /* From now on, we use 'written' to remember the current length of 's'. */ written = result; - if (get_options()->ContactInfo && strlen(get_options()->ContactInfo)) { + if (options->ContactInfo && strlen(options->ContactInfo)) { result = tor_snprintf(s+written,maxlen-written, "contact %s\n", - get_options()->ContactInfo); + options->ContactInfo); if (result<0) return -1; written += result; |