mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-25 15:10:48 +01:00
relay: Log if we can't find an address for configured ORPort
Everytime we try to discover an address we want to publish, emit a log notice if we are unable to find it even though an ORPort was configured for it. Because the function can be called quite often, we rate limit that notice to every hour so it gets annoying just enough so the operator fixes that. Related to #40254 Signed-off-by: David Goulet <dgoulet@torproject.org>
This commit is contained in:
parent
2e600019ea
commit
f03047332c
1 changed files with 11 additions and 0 deletions
|
@ -144,6 +144,17 @@ relay_find_addr_to_publish, (const or_options_t *options, int family,
|
||||||
if (find_my_address(options, family, LOG_INFO, addr_out, NULL, NULL)) {
|
if (find_my_address(options, family, LOG_INFO, addr_out, NULL, NULL)) {
|
||||||
goto found;
|
goto found;
|
||||||
}
|
}
|
||||||
|
/* No publishable address was found even though we have an ORPort thus
|
||||||
|
* print a notice log so operator can notice. We'll do that every hour so
|
||||||
|
* it is not too spammy but enough so operators address the issue. */
|
||||||
|
static ratelim_t rlim = RATELIM_INIT(3600);
|
||||||
|
log_fn_ratelim(&rlim, LOG_NOTICE, LD_CONFIG,
|
||||||
|
"Unable to find %s address for ORPort %u. "
|
||||||
|
"You might want to specify %sOnly to it or set an "
|
||||||
|
"explicit address or set Address.",
|
||||||
|
fmt_af_family(family),
|
||||||
|
routerconf_find_or_port(options, family),
|
||||||
|
fmt_af_family(family));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Third, consider address from our suggestion cache. */
|
/* Third, consider address from our suggestion cache. */
|
||||||
|
|
Loading…
Add table
Reference in a new issue