Merge branch 'maint-0.4.5'

This commit is contained in:
David Goulet 2020-12-21 14:55:44 -05:00
commit e7da681034
2 changed files with 13 additions and 2 deletions

3
changes/ticket40201 Normal file
View File

@ -0,0 +1,3 @@
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 0.4.5.1-alpha.

View File

@ -130,8 +130,16 @@ resolved_addr_set_suggested(const tor_addr_t *addr)
tor_addr_family(addr) != AF_INET6)) { tor_addr_family(addr) != AF_INET6)) {
return; return;
} }
tor_addr_copy(&last_suggested_addrs[af_to_idx(tor_addr_family(addr))],
addr); /* 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. /** Copy the last resolved address of family into addr_out.