Commit 6281c908 authored by David Goulet's avatar David Goulet Committed by Nick Mathewson
Browse files

relay: Emit log warning if Address is internal and can't be used


Signed-off-by: David Goulet's avatarDavid Goulet <dgoulet@torproject.org>
parent 6c14f907
o Minor bugfix (logging, relay):
- Emit a warning if an Address is found to be internal and tor can't use it.
Fixes bug 40290; bugfix on 0.4.5.1-alpha.
...@@ -343,6 +343,18 @@ get_address_from_config(const or_options_t *options, int warn_severity, ...@@ -343,6 +343,18 @@ get_address_from_config(const or_options_t *options, int warn_severity,
* used, custom authorities must be defined else it is a fatal error. * used, custom authorities must be defined else it is a fatal error.
* Furthermore, if the Address was resolved to an internal interface, we * Furthermore, if the Address was resolved to an internal interface, we
* stop immediately. */ * stop immediately. */
if (ret == ERR_ADDRESS_IS_INTERNAL) {
static bool logged_once = false;
if (!logged_once) {
log_warn(LD_CONFIG, "Address set with an internal address. Tor will "
"not work unless custom directory authorities "
"are defined (AlternateDirAuthority). It is also "
"possible to use an internal address if "
"PublishServerDescriptor is set to 0 and "
"AssumeReachable(IPv6) to 1.");
logged_once = true;
}
}
tor_free(*hostname_out); tor_free(*hostname_out);
return FN_RET_BAIL; return FN_RET_BAIL;
} }
......
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