Commit ec7a0ab6 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix IPv4 multicast subscription

parent aedf2f6c
......@@ -259,7 +259,7 @@ net_SockAddrIsMulticast (const struct sockaddr *addr, socklen_t len)
struct sockaddr_in *v4 = (struct sockaddr_in *)addr;
if (len < sizeof (*v4))
return VLC_FALSE;
return IN_MULTICAST (v4->sin_addr.s_addr) != 0;
return IN_MULTICAST (ntohl (v4->sin_addr.s_addr)) != 0;
}
#endif
......
......@@ -246,6 +246,8 @@ int net_Subscribe (vlc_object_t *obj, int fd, const struct sockaddr *addr,
imr.ipv6mr_interface = v6->sin6_scope_id;
memcpy (&imr.ipv6mr_multiaddr, &v6->sin6_addr, 16);
msg_Dbg (obj, "IPV6_JOIN_GROUP multicast request");
if (setsockopt (fd, IPPROTO_IPV6, IPV6_JOIN_GROUP, &imr,
sizeof (imr)))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment