use socket_set_ipv6only to bind only to the local v6 socket
This is since we probably will get a v4 adresses a tiny bit later, and that will fail binding.
This commit is contained in:
@@ -83,6 +83,7 @@ mini_inetd_addrinfo (struct addrinfo *ai)
|
|||||||
if (fds[i] < 0)
|
if (fds[i] < 0)
|
||||||
continue;
|
continue;
|
||||||
socket_set_reuseaddr (fds[i], 1);
|
socket_set_reuseaddr (fds[i], 1);
|
||||||
|
socket_set_ipv6only(fds[i], 1);
|
||||||
if (bind (fds[i], a->ai_addr, a->ai_addrlen) < 0) {
|
if (bind (fds[i], a->ai_addr, a->ai_addrlen) < 0) {
|
||||||
warn ("bind af = %d", a->ai_family);
|
warn ("bind af = %d", a->ai_family);
|
||||||
close(fds[i]);
|
close(fds[i]);
|
||||||
|
Reference in New Issue
Block a user