From 38d82bd3f1a1d3b9899962d878310163990a1cf8 Mon Sep 17 00:00:00 2001 From: ivmarkov Date: Thu, 28 Nov 2024 13:13:24 +0000 Subject: [PATCH] Ipv6 multicast support --- edge-nal-embassy/src/udp.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/edge-nal-embassy/src/udp.rs b/edge-nal-embassy/src/udp.rs index 5c5782b..5c2d10f 100644 --- a/edge-nal-embassy/src/udp.rs +++ b/edge-nal-embassy/src/udp.rs @@ -215,18 +215,24 @@ impl Mul { async fn join_v6( &mut self, - _multicast_addr: Ipv6Addr, + multicast_addr: Ipv6Addr, _interface: u32, ) -> Result<(), Self::Error> { - panic!("Joining an Ipv6 multicast group is not supported yet") + self.stack + .join_multicast_group(IpAddr::V6(multicast_addr))?; + + Ok(()) } async fn leave_v6( &mut self, - _multicast_addr: Ipv6Addr, + multicast_addr: Ipv6Addr, _interface: u32, ) -> Result<(), Self::Error> { - panic!("Leaving an Ipv6 multicast group is not supported yet") + self.stack + .leave_multicast_group(IpAddr::V6(multicast_addr))?; + + Ok(()) } }