From 4136c749b54cd3c6e6c3526fcef9f9f6e2e1db65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chaloupka?= Date: Thu, 31 Oct 2024 18:58:47 +0100 Subject: [PATCH] Fix `joinMulticastGroup` for `IPv6` It used wrong `IPPROTO_IP` instead of `IPPROTO_IPV6` in `setsockopt` --- source/eventcore/drivers/posix/sockets.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/eventcore/drivers/posix/sockets.d b/source/eventcore/drivers/posix/sockets.d index 406b411a..15a542d1 100644 --- a/source/eventcore/drivers/posix/sockets.d +++ b/source/eventcore/drivers/posix/sockets.d @@ -848,7 +848,7 @@ final class PosixEventDriverSockets(Loop : PosixEventLoop) : EventDriverSockets } else { mreq.ipv6mr_interface = htonl(interface_index); } - return () @trusted { return setsockopt(cast(sock_t)socket, IPPROTO_IP, IPV6_JOIN_GROUP, &mreq, ipv6_mreq.sizeof); } () == 0; + return () @trusted { return setsockopt(cast(sock_t)socket, IPPROTO_IPV6, IPV6_JOIN_GROUP, &mreq, ipv6_mreq.sizeof); } () == 0; } }