authorgravatar for zac@zacoons.comzacoons <zac@zacoons.com> 2026-04-28 08:51:18+10:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-05-27 03:12:49+02:00
logbe7065f7f541f3eb1dcb64869ef1fed716645cd1
treeab749621658923dc6cf159f9a9d68603a10fc6f2
parentd0c6ed189b334fa4ad60485724d59ad9a78b0046

std.Io: fix openSocketPosix ignoring ip6_only option


3 files changed, 3 insertions(+), 3 deletions(-)

lib/std/Io/Kqueue.zig+1-1
...@@ -1403,7 +1403,7 @@ fn openSocketPosix(...@@ -1403,7 +1403,7 @@ fn openSocketPosix(
14031403
1404 if (options.ip6_only) {1404 if (options.ip6_only) {
1405 if (posix.IPV6 == void) return error.OptionUnsupported;1405 if (posix.IPV6 == void) return error.OptionUnsupported;
1406 try setSocketOption(k, socket_fd, posix.IPPROTO.IPV6, posix.IPV6.V6ONLY, 0);1406 try setSocketOption(k, socket_fd, posix.IPPROTO.IPV6, posix.IPV6.V6ONLY, 1);
1407 }1407 }
14081408
1409 return socket_fd;1409 return socket_fd;
lib/std/Io/Threaded.zig+1-1
...@@ -12409,7 +12409,7 @@ fn openSocketPosix(...@@ -12409,7 +12409,7 @@ fn openSocketPosix(
1240912409
12410 if (options.ip6_only) {12410 if (options.ip6_only) {
12411 if (posix.IPV6 == void) return error.OptionUnsupported;12411 if (posix.IPV6 == void) return error.OptionUnsupported;
12412 try setSocketOptionPosix(socket_fd, posix.IPPROTO.IPV6, posix.IPV6.V6ONLY, 0);12412 try setSocketOptionPosix(socket_fd, posix.IPPROTO.IPV6, posix.IPV6.V6ONLY, 1);
12413 }12413 }
1241412414
12415 return socket_fd;12415 return socket_fd;
lib/std/Io/Uring.zig+1-1
...@@ -5984,7 +5984,7 @@ fn socket(...@@ -5984,7 +5984,7 @@ fn socket(
59845984
5985 if (options.ip6_only) {5985 if (options.ip6_only) {
5986 if (linux.IPV6 == void) return error.OptionUnsupported;5986 if (linux.IPV6 == void) return error.OptionUnsupported;
5987 try ev.setsockopt(cancel_region, socket_fd, linux.IPPROTO.IPV6, linux.IPV6.V6ONLY, 0);5987 try ev.setsockopt(cancel_region, socket_fd, linux.IPPROTO.IPV6, linux.IPV6.V6ONLY, 1);
5988 }5988 }
59895989
5990 return socket_fd;5990 return socket_fd;