oops wrong level

This commit is contained in:
Adam D. Ruppe 2023-09-04 20:51:36 -04:00
parent 9606ded124
commit 4aad28fc7f
2 changed files with 2 additions and 2 deletions

2
cgi.d
View File

@ -6026,7 +6026,7 @@ Socket startListening(string host, ushort port, ref bool tcp, ref void delegate(
cloexec(listener);
listener.setOption(SocketOptionLevel.SOCKET, SocketOption.REUSEADDR, true);
if(address.addressFamily == AddressFamily.INET6)
listener.setOption(SocketOptionLevel.SOCKET, SocketOption.IPV6_V6ONLY, true);
listener.setOption(SocketOptionLevel.IPV6, SocketOption.IPV6_V6ONLY, true);
listener.bind(address);
cleanup = delegate() {
listener.close();

2
core.d
View File

@ -3139,7 +3139,7 @@ class AsyncSocket : AsyncFile {
if(address.domain == AF_INET6) {
int opt = 1;
setsockopt(handle, SOL_SOCKET, IPV6_V6ONLY, &opt, opt.sizeof);
setsockopt(handle, IPPROTO_IPV6 /*SOL_IPV6*/, IPV6_V6ONLY, &opt, opt.sizeof);
}
// FIXME: chekc for broadcast