summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorteor (Tim Wilson-Brown) <teor2345@gmail.com>2016-07-01 14:26:00 +1000
committerteor (Tim Wilson-Brown) <teor2345@gmail.com>2016-07-01 14:26:00 +1000
commit744077dd155c347092002d2fa642ebdaca651608 (patch)
treea2d894430f418ec5b8fbc8432aaa29e480cf3103
parent2c9354fc1087c8b0bbfa7273106195e74540c731 (diff)
downloadtor-744077dd155c347092002d2fa642ebdaca651608.tar.gz
tor-744077dd155c347092002d2fa642ebdaca651608.zip
When tor can't find a directory, log less
-rw-r--r--changes/bug188494
-rw-r--r--src/or/routerlist.c18
2 files changed, 12 insertions, 10 deletions
diff --git a/changes/bug18849 b/changes/bug18849
new file mode 100644
index 0000000000..b12a8da011
--- /dev/null
+++ b/changes/bug18849
@@ -0,0 +1,4 @@
+ o Minor bugfix (logging):
+ - Reduce excessive logging when directories can't be found.
+ Fixes bug 18849; bugfix on 0.2.8.3-alpha and 0.2.8.1-alpha.
+ Patch by teor.
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 49d76807b7..620c32d641 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -1579,20 +1579,18 @@ router_picked_poor_directory_log(const routerstatus_t *rs)
#endif
/* We couldn't find a node, or the one we have doesn't fit our preferences.
- * This might be a bug. */
+ * Sometimes this is normal, sometimes it can be a reachability issue. */
if (!rs) {
- static int logged_backtrace = 0;
- log_info(LD_BUG, "Wanted to make an outgoing directory connection, but "
- "all OR and Dir addresses for all relays were not reachable. "
- "Check ReachableAddresses, ClientUseIPv4, and similar options.");
- if (!logged_backtrace) {
- log_backtrace(LOG_INFO, LD_BUG, "Node search initiated by");
- logged_backtrace = 1;
- }
+ /* This happens a lot, so it's at debug level */
+ log_debug(LD_DIR, "Wanted to make an outgoing directory connection, but "
+ "we couldn't find a directory that fit our criteria. "
+ "Perhaps we will succeed next time with less strict criteria.");
} else if (!fascist_firewall_allows_rs(rs, FIREWALL_OR_CONNECTION, 1)
&& !fascist_firewall_allows_rs(rs, FIREWALL_DIR_CONNECTION, 1)
) {
- log_info(LD_BUG, "Selected a directory %s with non-preferred OR and Dir "
+ /* This is rare, and might be interesting to users trying to diagnose
+ * connection issues on dual-stack machines. */
+ log_info(LD_DIR, "Selected a directory %s with non-preferred OR and Dir "
"addresses for launching an outgoing connection: "
"IPv4 %s OR %d Dir %d IPv6 %s OR %d Dir %d",
routerstatus_describe(rs),