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

Fix local port number for multicast receival

parent d32fd7e1
......@@ -160,9 +160,11 @@ int *net_Listen (vlc_object_t *p_this, const char *psz_host,
if (net_SockAddrIsMulticast (ptr->ai_addr, ptr->ai_addrlen)
&& (sizeof (struct sockaddr_storage) >= ptr->ai_addrlen))
{
struct sockaddr_storage dumb =
// This works for IPv4 too - don't worry!
struct sockaddr_in6 dumb =
{
.ss_family = ptr->ai_addr->sa_family
.sin6_family = ptr->ai_addr->sa_family,
.sin6_port = ((struct sockaddr_in *)(ptr->ai_addr))->sin_port
};
bind (fd, (struct sockaddr *)&dumb, ptr->ai_addrlen);
......
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