diff options
author | teor (Tim Wilson-Brown) <teor2345@gmail.com> | 2016-03-24 10:38:07 +1100 |
---|---|---|
committer | teor (Tim Wilson-Brown) <teor2345@gmail.com> | 2016-03-24 10:39:23 +1100 |
commit | f2a344e3974eeba860434884bd70f8d11cca94ea (patch) | |
tree | 543d199f715730999ad2d45db1bdb04ea2b4f24a /src/or/routerlist.c | |
parent | 45681f695c6096e280bc7ec3bf0a67c27708dbbc (diff) | |
download | tor-f2a344e3974eeba860434884bd70f8d11cca94ea.tar.gz tor-f2a344e3974eeba860434884bd70f8d11cca94ea.zip |
Downgrade IP version warnings to avoid filling logs
Downgrade logs and backtraces about IP versions to
info-level. Only log backtraces once each time tor runs.
Assists in diagnosing bug 18351; bugfix on c3cc8e16e in
tor-0.2.8.1-alpha.
Reported by "sysrqb" and "Christian", patch by "teor".
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r-- | src/or/routerlist.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index bc5e2e9133..f065c3c202 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -1560,9 +1560,13 @@ router_picked_poor_directory_log(const routerstatus_t *rs) /* We couldn't find a node, or the one we have doesn't fit our preferences. * This might be a bug. */ if (!rs) { - log_warn(LD_BUG, "Firewall denied all OR and Dir addresses for all relays " + static int logged_backtrace = 0; + log_info(LD_BUG, "Firewall denied all OR and Dir addresses for all relays " "when searching for a directory."); - log_backtrace(LOG_WARN, LD_BUG, "Node search initiated by"); + if (!logged_backtrace) { + log_backtrace(LOG_INFO, LD_BUG, "Node search initiated by"); + logged_backtrace = 1; + } } else if (!fascist_firewall_allows_rs(rs, FIREWALL_OR_CONNECTION, 1) && !fascist_firewall_allows_rs(rs, FIREWALL_DIR_CONNECTION, 1) ) { @@ -1573,7 +1577,6 @@ router_picked_poor_directory_log(const routerstatus_t *rs) fmt_addr32(rs->addr), rs->or_port, rs->dir_port, fmt_addr(&rs->ipv6_addr), rs->ipv6_orport, rs->dir_port); - log_backtrace(LOG_INFO, LD_BUG, "Node search initiated by"); } } |