Merge branch 'mr_347_squashed' into maint-0.4.6

This commit is contained in:
Nick Mathewson 2021-04-19 11:40:44 -04:00
commit 0ceacb5482
2 changed files with 15 additions and 0 deletions

3
changes/ticket40290 Normal file
View File

@ -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.

View File

@ -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;
}