summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changes/bug132215
-rw-r--r--src/or/config.c8
2 files changed, 9 insertions, 4 deletions
diff --git a/changes/bug13221 b/changes/bug13221
new file mode 100644
index 0000000000..13935a1921
--- /dev/null
+++ b/changes/bug13221
@@ -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.
diff --git a/src/or/config.c b/src/or/config.c
index 810f1e9a7a..e0d1794bdf 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -6650,13 +6650,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;
}