Commit aae9a05a authored by David Goulet's avatar David Goulet 🤘
Browse files

relay: Log address suggested by directory authorities

If we get an address suggestion from a directory authority and we have no
address configured or discovered, log it at notice level so the operator can
learn what address will be used by Tor.

Fixes #40201

Signed-off-by: David Goulet's avatarDavid Goulet <>
parent ad00da66
o Minor bugfixes (logging, relay):
- Logs the address discovered by the directory authorities if none were
configured or detected before. Fixes bug 40201; bugfix on
......@@ -130,8 +130,16 @@ resolved_addr_set_suggested(const tor_addr_t *addr)
tor_addr_family(addr) != AF_INET6)) {
/* In case we don't have a configured address, log that we will be using the
* one discovered from the dirauth. */
const int idx = af_to_idx(tor_addr_family(addr));
if (tor_addr_is_null(&last_resolved_addrs[idx]) &&
!tor_addr_eq(&last_suggested_addrs[idx], addr)) {
log_notice(LD_CONFIG, "External address seen and suggested by a "
"directory authority: %s", fmt_addr(addr));
tor_addr_copy(&last_suggested_addrs[idx], addr);
/** Copy the last resolved address of family into addr_out.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment