[dvblast-devel] Problems joining source-specific multicast stream
Georgi Chorbadzhiyski
gf at unixsol.org
Mon Nov 18 11:38:20 CET 2013
Around 11/13/2013 11:53 PM, Kristian Pedersen scribbled:
> Im attempting to join a source-specific multicast stream and send it out
> again as a unicast stream. It seems the multicast source address is not
> being handled correct.
>
> testpc1:~# cat dvblast.conf
> 10.10.10.10:5900 1 1720
>
> testpc1:~# dvblast -D 172.18.64.6 at 232.20.0.23:5900 -c dvblast.conf
> DVBlast 2.2 (release)
> warning: restarting
> debug: binding socket to 172.18.64.6 at 232.20.0.23:5900
> debug: conf: 10.10.10.10:5900 config=0x1 sid=1720 pids[0]
> ^Cinfo: Shutdown was requested.
> debug: removing 10.10.10.10:5900
>
> Checking IGMP packets with tcpdumps reveals source 172.18.64.6 is not
> included:
>
> tcpdump: listening on eth1, link-type EN10MB (Ethernet), capture size
> 65535 bytes
> 22:37:45.186436 IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto
> IGMP (2), length 56, options (RA))
> 100.114.0.2 > 224.0.0.22: igmp v3 report, 2 group record(s) [gaddr
> 232.20.0.23 allow { 0.0.0.0 }] [gaddr 232.20.0.23 to_in { 0.0.0.0 }]
> 22:37:45.518407 IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto
> IGMP (2), length 56, options (RA))
> 100.114.0.2 > 224.0.0.22: igmp v3 report, 2 group record(s) [gaddr
> 232.20.0.23 allow { 0.0.0.0 }] [gaddr 232.20.0.23 to_in { 0.0.0.0 }]
> 22:37:48.190428 IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto
> IGMP (2), length 44, options (RA))
> 100.114.0.2 > 224.0.0.22: igmp v3 report, 1 group record(s) [gaddr
> 232.20.0.23 block { 0.0.0.0 }]
>
> I think p_src is not getting parsed correctly in udp.c?
>
> imr.imr_sourceaddr = p_src->sin_addr;
>
>
> I tried to add:
> inet_pton(AF_INET, "172.18.64.6", &p_src->sin_addr);
>
> Just before line: imr.imr_sourceaddr = p_src->sin_addr;
>
> This fixes the missing source in IGMP joins and packets starts flowing,
> but then I get lots of:
>
> warning: lost TS sync
> lost TS sync
> warning: invalid RTP packet received
> warning: non-TS RTP packet received
>
> And it thinks the RTP source keeps changing:
>
> debug: new RTP source: 0.0.0.0
> new RTP source: 0.0.0.0
> debug: new RTP source: 18.73.114.12
> new RTP source: 18.73.114.12
> debug: new RTP source: 22.195.168.99
> new RTP source: 22.195.168.99
>
> Unfortunately my C skills are not nearly good enough to attempt to do a
> proper fix.
>
> Tested with Debian 6.x, 2.6.32-5-xen-amd64, dvblast 2.2-1 package aswell
> as latest GIT and Ubuntu 13.04, 3.8.0-33-generic dvblast latest git
Please try this patch, it seems to fix the issue here:
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" );
--
Georgi Chorbadzhiyski | http://georgi.unixsol.org/ | http://github.com/gfto/
More information about the dvblast-devel
mailing list