Print getaddrinfo failure properly

This commit is contained in:
Erik Ekman 2021-08-09 13:42:49 +02:00
parent 559dafb030
commit 43a82ef6be
1 changed files with 2 additions and 1 deletions

View File

@ -2612,7 +2612,8 @@ main(int argc, char **argv)
addrfamily = AF_INET; addrfamily = AF_INET;
} }
} else if (addr6_res < 0) { } else if (addr6_res < 0) {
warn("Failed to get IPv6 address to listen on: '%s'", listen_ip6); warnx("Failed to get IPv6 address to listen on: '%s': %s",
listen_ip6, gai_strerror(addr6_res));
usage(); usage();
} else { } else {
dns6addr_len = addr6_res; dns6addr_len = addr6_res;