summaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorteor (Tim Wilson-Brown) <teor2345@gmail.com>2016-01-18 14:00:29 +1100
committerteor (Tim Wilson-Brown) <teor2345@gmail.com>2016-01-18 14:00:29 +1100
commit6094a886cf9be92d29077b428554a75c9971a2ca (patch)
treeb9f5cd63773deabd992ee27f00e79734507c645d /src/or/main.c
parentc7b0cd9c2f52ca289515833060ac0b8461da2225 (diff)
downloadtor-6094a886cf9be92d29077b428554a75c9971a2ca.tar.gz
tor-6094a886cf9be92d29077b428554a75c9971a2ca.zip
Check ORPort and DirPort reachability before publishing a relay descriptor
Otherwise, relays publish a descriptor with DirPort 0 when the DirPort reachability test takes longer than the ORPort reachability test. Closes bug #18050. Reported by "starlight", patch by "teor". Bugfix on 0.1.0.1-rc, commit a1f1fa6ab on 27 Feb 2005.
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/or/main.c b/src/or/main.c
index df0cd1bee3..5198b5100b 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -1718,8 +1718,9 @@ second_elapsed_callback(periodic_timer_t *timer, void *arg)
if (me && !check_whether_orport_reachable()) {
char *address = tor_dup_ip(me->addr);
log_warn(LD_CONFIG,"Your server (%s:%d) has not managed to confirm that "
- "its ORPort is reachable. Please check your firewalls, ports, "
- "address, /etc/hosts file, etc.",
+ "its ORPort is reachable. Relays do not publish descriptors "
+ "until their ORPort and DirPort are reachable. Please check "
+ "your firewalls, ports, address, /etc/hosts file, etc.",
address, me->or_port);
control_event_server_status(LOG_WARN,
"REACHABILITY_FAILED ORADDRESS=%s:%d",
@@ -1731,8 +1732,9 @@ second_elapsed_callback(periodic_timer_t *timer, void *arg)
char *address = tor_dup_ip(me->addr);
log_warn(LD_CONFIG,
"Your server (%s:%d) has not managed to confirm that its "
- "DirPort is reachable. Please check your firewalls, ports, "
- "address, /etc/hosts file, etc.",
+ "DirPort is reachable. Relays do not publish descriptors "
+ "until their ORPort and DirPort are reachable. Please check "
+ "your firewalls, ports, address, /etc/hosts file, etc.",
address, me->dir_port);
control_event_server_status(LOG_WARN,
"REACHABILITY_FAILED DIRADDRESS=%s:%d",