From 72e6aa7e17bb74fe962071753e1a87fa2fba2258 Mon Sep 17 00:00:00 2001 From: Skye Soss Date: Mon, 2 Feb 2026 12:11:25 -0600 Subject: [PATCH] Add IPV6_MULTICAST_LOOP socket option This exposes the IPv6 version of the IP_MULTICAST_LOOP socket option. --- src/sys/socket/sockopt.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/sys/socket/sockopt.rs b/src/sys/socket/sockopt.rs index 03a55d407c..ccb9fe0377 100644 --- a/src/sys/socket/sockopt.rs +++ b/src/sys/socket/sockopt.rs @@ -479,6 +479,17 @@ sockopt_impl!( libc::IP_MULTICAST_LOOP, bool ); +#[cfg(feature = "net")] +sockopt_impl!( + #[cfg_attr(docsrs, doc(cfg(feature = "net")))] + /// Set or read a boolean integer argument that determines whether sent + /// multicast packets should be looped back to the local sockets. + Ipv6MulticastLoop, + Both, + libc::IPPROTO_IPV6, + libc::IPV6_MULTICAST_LOOP, + bool +); #[cfg(target_os = "linux")] #[cfg(feature = "net")] sockopt_impl!(