From 33b5f6790db4e91ebd2370a97405e13932c4759c Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Tue, 3 Nov 2026 14:03:35 +0100 Subject: Bind mcast socket to its group rather than the wildcard --- src/ot_socket.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/ot_socket.c') diff --git a/src/ot_socket.c b/src/ot_socket.c index 79bb01a..b6a1803 100644 --- a/src/ot_socket.c +++ b/src/ot_socket.c @@ -263,15 +263,9 @@ static int socket_v4_bind(const ot_ip6 ip, uint16_t port) { int socket_mcast_join(const ot_ip6 group, const ot_ip6 interface, uint16_t port) { struct ip_mreq mreq; - ot_ip6 any; int s; - /* The group is what is listened to, so the socket takes the wildcard and - the join names the interface to receive it on */ - memcpy(any, ip_v4mapped_prefix, sizeof(ip_v4mapped_prefix)); - memset(any + sizeof(ip_v4mapped_prefix), 0, 4); - - if ((s = socket_v4_bind(any, port)) == -1) + if ((s = socket_v4_bind(group, port)) == -1) return -1; memset(&mreq, 0, sizeof(mreq)); -- cgit v1.3