[dvblast-devel] Fix setting of source specific multicast (SSM).
Georgi Chorbadzhiyski
git at videolan.org
Tue Nov 19 04:59:03 CET 2013
dvblast | branch: master | Georgi Chorbadzhiyski <gf at unixsol.org> | Tue Nov 19 05:55:11 2013 +0200| [44fd61181d782fbb45c5f9686057afd394c46c5f] | committer: Georgi Chorbadzhiyski
Fix setting of source specific multicast (SSM).
It was reported that setting SSM address doesn't work. This
patch fixes it.
Reported-by: Kristian Pedersen <kristian.pedersen at vejen-net.dk>
> http://git.videolan.org/gitweb.cgi/dvblast.git/?a=commit;h=44fd61181d782fbb45c5f9686057afd394c46c5f
---
udp.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/udp.c b/udp.c
index fd5a7e0..0811718 100644
--- a/udp.c
+++ b/udp.c
@@ -188,12 +188,11 @@ void udp_Open( void )
msg_Err( NULL, "IP_ADD_SOURCE_MEMBERSHIP is unsupported." );
#else
/* Source-specific multicast */
- struct sockaddr_in *p_src =
- (struct sockaddr_in *)&p_connect_ai->ai_addr;
+ struct sockaddr *p_src = p_connect_ai->ai_addr;
struct ip_mreq_source imr;
imr.imr_multiaddr = p_addr->sin_addr;
imr.imr_interface.s_addr = i_if_addr;
- imr.imr_sourceaddr = p_src->sin_addr;
+ imr.imr_sourceaddr = ((struct sockaddr_in *)p_src)->sin_addr;
if ( i_if_index )
msg_Warn( NULL, "ignoring ifindex option in SSM" );
More information about the dvblast-devel
mailing list