debug2("bind port %d: %.100s", port, strerror(errno));
close(sock);
/* Linux returns both IPv4 adn IPv6 local
addresses here even if IPv6 is disabled.
Ignore error in this case.
*/
if (ai->ai_family == AF_INET6 && errno == EADDRNOTAVAIL)
continue;
for (n = 0; n < num_socks; n++) {
close(socks[n]);
}