summaryrefslogtreecommitdiff
path: root/src/ot_socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ot_socket.c')
-rw-r--r--src/ot_socket.c8
1 files changed, 1 insertions, 7 deletions
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) {
263 263
264int socket_mcast_join(const ot_ip6 group, const ot_ip6 interface, uint16_t port) { 264int socket_mcast_join(const ot_ip6 group, const ot_ip6 interface, uint16_t port) {
265 struct ip_mreq mreq; 265 struct ip_mreq mreq;
266 ot_ip6 any;
267 int s; 266 int s;
268 267
269 /* The group is what is listened to, so the socket takes the wildcard and 268 if ((s = socket_v4_bind(group, port)) == -1)
270 the join names the interface to receive it on */
271 memcpy(any, ip_v4mapped_prefix, sizeof(ip_v4mapped_prefix));
272 memset(any + sizeof(ip_v4mapped_prefix), 0, 4);
273
274 if ((s = socket_v4_bind(any, port)) == -1)
275 return -1; 269 return -1;
276 270
277 memset(&mreq, 0, sizeof(mreq)); 271 memset(&mreq, 0, sizeof(mreq));