Merge remote-tracking branch 'tor-github/pr/726' into maint-0.3.5

This commit is contained in:
teor 2019-04-19 11:51:05 +10:00
commit cb084de5e5
No known key found for this signature in database
GPG Key ID: 10FEAA0E7075672A
2 changed files with 9 additions and 4 deletions

5
changes/bug13221 Normal file
View File

@ -0,0 +1,5 @@
o Minor bugfixes (logging):
- Correct a misleading error message when IPv4Only or IPv6Only
is used but the resolved address can not be interpreted as an
address of the specified IP version. Fixes bug 13221; bugfix
on 0.2.3.9-alpha. Patch from Kris Katterjohn.

View File

@ -7061,13 +7061,13 @@ parse_port_config(smartlist_t *out,
portname, escaped(ports->value));
goto err;
}
if (bind_ipv4_only && tor_addr_family(&addr) == AF_INET6) {
log_warn(LD_CONFIG, "Could not interpret %sPort address as IPv6",
if (bind_ipv4_only && tor_addr_family(&addr) != AF_INET) {
log_warn(LD_CONFIG, "Could not interpret %sPort address as IPv4",
portname);
goto err;
}
if (bind_ipv6_only && tor_addr_family(&addr) == AF_INET) {
log_warn(LD_CONFIG, "Could not interpret %sPort address as IPv4",
if (bind_ipv6_only && tor_addr_family(&addr) != AF_INET6) {
log_warn(LD_CONFIG, "Could not interpret %sPort address as IPv6",
portname);
goto err;
}