aboutsummaryrefslogtreecommitdiff
path: root/src/or/router.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-01-18 19:51:57 -0500
committerNick Mathewson <nickm@torproject.org>2016-01-18 19:51:57 -0500
commit83dfcfbc4a295ca52325f47291d109cd0a16ac8f (patch)
tree2b292b5eeddcdfcc6de739158a2bdea81449fd4e /src/or/router.c
parentb34c5c6b8ac0d13d5e2bda188ff038f6ff7eb4f3 (diff)
parent6094a886cf9be92d29077b428554a75c9971a2ca (diff)
downloadtor-83dfcfbc4a295ca52325f47291d109cd0a16ac8f.tar.gz
tor-83dfcfbc4a295ca52325f47291d109cd0a16ac8f.zip
Merge remote-tracking branch 'teor/bug18050' into maint-0.2.7
Diffstat (limited to 'src/or/router.c')
-rw-r--r--src/or/router.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/or/router.c b/src/or/router.c
index 8fdad9a5fa..841f6fde1b 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -1267,7 +1267,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");
@@ -1291,7 +1292,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");
@@ -1494,7 +1498,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
@@ -1513,7 +1518,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,