diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-01-18 19:52:34 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-01-18 19:52:34 -0500 |
commit | 0ace22ef6dcb918c74cdfadd90a21afe622f2921 (patch) | |
tree | 5668567124bbc0bd9d2313c6b664d000ab26bace /src/or/router.c | |
parent | da4dbb29b77bc6769781bf2eb38fd5364f232a54 (diff) | |
parent | 83dfcfbc4a295ca52325f47291d109cd0a16ac8f (diff) | |
download | tor-0ace22ef6dcb918c74cdfadd90a21afe622f2921.tar.gz tor-0ace22ef6dcb918c74cdfadd90a21afe622f2921.zip |
Merge remote-tracking branch 'origin/maint-0.2.7'
Diffstat (limited to 'src/or/router.c')
-rw-r--r-- | src/or/router.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/or/router.c b/src/or/router.c index c94dca951b..8cde4a1a35 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -1317,7 +1317,8 @@ router_orport_found_reachable(void) char *address = tor_dup_ip(me->addr); log_notice(LD_OR,"Self-testing indicates your ORPort is reachable from " "the outside. Excellent.%s", - get_options()->PublishServerDescriptor_ != NO_DIRINFO ? + get_options()->PublishServerDescriptor_ != NO_DIRINFO + && check_whether_dirport_reachable() ? " Publishing server descriptor." : ""); can_reach_or_port = 1; mark_my_descriptor_dirty("ORPort found reachable"); @@ -1341,7 +1342,10 @@ router_dirport_found_reachable(void) if (!can_reach_dir_port && me) { char *address = tor_dup_ip(me->addr); log_notice(LD_DIRSERV,"Self-testing indicates your DirPort is reachable " - "from the outside. Excellent."); + "from the outside. Excellent.%s", + get_options()->PublishServerDescriptor_ != NO_DIRINFO + && check_whether_orport_reachable() ? + " Publishing server descriptor." : ""); can_reach_dir_port = 1; if (decide_to_advertise_dirport(get_options(), me->dir_port)) { mark_my_descriptor_dirty("DirPort found reachable"); @@ -1544,7 +1548,8 @@ proxy_mode(const or_options_t *options) * and * - We have ORPort set * and - * - We believe we are reachable from the outside; or + * - We believe both our ORPort and DirPort (if present) are reachable from + * the outside; or * - We are an authoritative directory server. */ static int @@ -1563,7 +1568,7 @@ decide_if_publishable_server(void) if (!router_get_advertised_or_port(options)) return 0; - return check_whether_orport_reachable(); + return check_whether_orport_reachable() && check_whether_dirport_reachable(); } /** Initiate server descriptor upload as reasonable (if server is publishable, |