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(
14031403
14041404 if (options.ip6_only) {
14051405 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);
14071407 }
14081408
14091409 return socket_fd;
lib/std/Io/Threaded.zig+1-1
......@@ -12409,7 +12409,7 @@ fn openSocketPosix(
1240912409
1241012410 if (options.ip6_only) {
1241112411 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);
1241312413 }
1241412414
1241512415 return socket_fd;
lib/std/Io/Uring.zig+1-1
......@@ -5984,7 +5984,7 @@ fn socket(
59845984
59855985 if (options.ip6_only) {
59865986 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);
59885988 }
59895989
59905990 return socket_fd;