diff options
author | David Goulet <dgoulet@torproject.org> | 2021-03-25 10:15:50 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2021-04-19 11:40:30 -0400 |
commit | 6281c90885b09d3c5faad51cbb4cee686a4bb8ff (patch) | |
tree | 8a52dccdb34e2a35fe455c94516355bf07a2a586 | |
parent | 6c14f9076f80f7749543841d47a032d9a71bc6b6 (diff) | |
download | tor-6281c90885b09d3c5faad51cbb4cee686a4bb8ff.tar.gz tor-6281c90885b09d3c5faad51cbb4cee686a4bb8ff.zip |
relay: Emit log warning if Address is internal and can't be used
Signed-off-by: David Goulet <dgoulet@torproject.org>
-rw-r--r-- | changes/ticket40290 | 3 | ||||
-rw-r--r-- | src/app/config/resolve_addr.c | 12 |
2 files changed, 15 insertions, 0 deletions
diff --git a/changes/ticket40290 b/changes/ticket40290 new file mode 100644 index 0000000000..3d3a64be93 --- /dev/null +++ b/changes/ticket40290 @@ -0,0 +1,3 @@ + 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. diff --git a/src/app/config/resolve_addr.c b/src/app/config/resolve_addr.c index 43a3eb39de..09d4b800f6 100644 --- a/src/app/config/resolve_addr.c +++ b/src/app/config/resolve_addr.c @@ -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. * Furthermore, if the Address was resolved to an internal interface, we * 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); return FN_RET_BAIL; } |