diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-03-24 09:33:58 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-03-24 09:33:58 -0400 |
commit | 54559e5845f42c51600b80de6b67467627451fcb (patch) | |
tree | e401a2ff21c6e8b74401e57d1acfbd57c59876bc /src/or/directory.c | |
parent | ea9472d085b1344eb3abc3f9e644beff184cbce3 (diff) | |
parent | 355f78364a7d1fa3c2de0a93e68153ae65526e02 (diff) | |
download | tor-54559e5845f42c51600b80de6b67467627451fcb.tar.gz tor-54559e5845f42c51600b80de6b67467627451fcb.zip |
Merge remote-tracking branch 'teor/bug18351'
Diffstat (limited to 'src/or/directory.c')
-rw-r--r-- | src/or/directory.c | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index 52cc6a9ec6..21a879dcad 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -672,15 +672,20 @@ directory_choose_address_routerstatus(const routerstatus_t *status, FIREWALL_DIR_CONNECTION, 0, use_dir_ap); - /* We rejected both addresses. This isn't great. */ + /* We rejected all addresses in the relay's status. This means we can't + * connect to it. */ if (!have_or && !have_dir) { - log_warn(LD_BUG, "Rejected all OR and Dir addresses from %s when " - "launching a directory connection to: IPv4 %s OR %d Dir %d " - "IPv6 %s OR %d Dir %d", routerstatus_describe(status), + static int logged_backtrace = 0; + log_info(LD_BUG, "Rejected all OR and Dir addresses from %s when " + "launching an outgoing directory connection to: IPv4 %s OR %d " + "Dir %d IPv6 %s OR %d Dir %d", routerstatus_describe(status), fmt_addr32(status->addr), status->or_port, status->dir_port, fmt_addr(&status->ipv6_addr), status->ipv6_orport, status->dir_port); - log_backtrace(LOG_WARN, LD_BUG, "Addresses came from"); + if (!logged_backtrace) { + log_backtrace(LOG_INFO, LD_BUG, "Addresses came from"); + logged_backtrace = 1; + } return -1; } @@ -1100,14 +1105,23 @@ directory_initiate_command_rend(const tor_addr_port_t *or_addr_port, if (or_connection && (!or_addr_port->port || tor_addr_is_null(&or_addr_port->addr))) { - log_warn(LD_DIR, "Cannot make an OR connection without an OR port."); - log_backtrace(LOG_WARN, LD_BUG, "Address came from"); + static int logged_backtrace = 0; + log_warn(LD_DIR, "Cannot make an outgoing OR connection without an OR " + "port."); + if (!logged_backtrace) { + log_backtrace(LOG_INFO, LD_BUG, "Address came from"); + logged_backtrace = 1; + } return; } else if (!or_connection && (!dir_addr_port->port || tor_addr_is_null(&dir_addr_port->addr))) { - log_warn(LD_DIR, "Cannot make a Dir connection without a Dir port."); - log_backtrace(LOG_WARN, LD_BUG, "Address came from"); - + static int logged_backtrace = 0; + log_warn(LD_DIR, "Cannot make an outgoing Dir connection without a Dir " + "port."); + if (!logged_backtrace) { + log_backtrace(LOG_INFO, LD_BUG, "Address came from"); + logged_backtrace = 1; + } return; } |