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

- Only try to use SSM when the group address is SSM itself

  (afterall, we could specify a source/server even with ASM)
- Backport IPv6 SSM compilation problem on BSD
parent 00249b14
......@@ -264,7 +264,8 @@ static int OpenUDP( vlc_object_t * p_this )
/* If we have a source address, we use IP_ADD_SOURCE_MEMBERSHIP
so that IGMPv3 aware OSes running on IGMPv3 aware networks
will do an IGMPv3 query on the network */
if( *psz_server_addr )
if (( *psz_server_addr )
&& ((ntohl (sock.sin_addr.s_addr) >> 24) == 232))
{
struct ip_mreq_source imr;
......
......@@ -54,13 +54,9 @@ static const struct in6_addr in6addr_any = {{IN6ADDR_ANY_INIT}};
# define close closesocket
#endif
#ifndef MCAST_JOIN_SOURCE_GROUP
# ifdef WIN32
/* Most (all?) Mingw32 versions in use are yet to pick up Vista stuff */
#if defined (WIN32) && !defined (MCAST_JOIN_SOURCE_GROUP)
/* Interim Vista definitions */
# define MCAST_JOIN_SOURCE_GROUP 45 /* from <ws2ipdef.h> */
# else
# define MCAST_JOIN_SOURCE_GROUP 46
# endif
struct group_source_req
{
uint32_t gsr_interface; /* interface index */
......@@ -243,7 +239,8 @@ static int OpenUDP( vlc_object_t * p_this )
/* Join the multicast group if the socket is a multicast address */
if( IN6_IS_ADDR_MULTICAST(&sock.sin6_addr) )
{
if(*psz_server_addr)
if ((*psz_server_addr)
&& ((U32_AT (&sock.sin6_addr) & 0xff30ffff) == 0xff300000))
{
struct group_source_req imr;
struct sockaddr_in6 *p_sin6;
......
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