From WSmith at ket.org Tue Aug 7 02:02:28 2012 From: WSmith at ket.org (William Smith) Date: Tue, 7 Aug 2012 00:02:28 +0000 Subject: [Udpcast] Udp-sender take 3 In-Reply-To: <50182C8B.5080206@knaff.lu> References: <96ED2883DF89DA43B53A2B795C2911EB702A5CC7@CH1PRD0310MB380.namprd03.prod.outlook.com> <50182C8B.5080206@knaff.lu> Message-ID: <96ED2883DF89DA43B53A2B795C2911EB702A8B9F@CH1PRD0310MB380.namprd03.prod.outlook.com> Sorry, was on vacation when you answered... Setting the family fixed the bind problem. Using async mode and a --max-bitrate I can get it to run if I assign two different IPs to --mcast-rdv-address and --mcast-data-address. I'm now working on the getting the rate governor to work. It appears that udp-sender gets to the broadcasting control message and stops even in async mode.. Command is: udp-sender -f filename -- async --fec 8x8 --mcast-rdv-address 225.0.0.1 --mcast-data-address 225.0.0.2 -g ipe.so:ip=235.0.0.1,port 1024 William -----Original Message----- From: Alain Knaff [mailto:alain at knaff.lu] Sent: Tuesday, July 31, 2012 3:06 PM To: udpcast at udpcast.linux.lu Cc: William Smith Subject: Re: [Udpcast] Udp-sender take 3 On 2012-07-27 02:21, William Smith wrote: > Ok got a Fedora box up and running and got the ipe.so made but have hit a snag.. > > When I use the --rate-governor option the system reports a bind: > Address family not supported by protocol error Did you supply an ip=xxx and a port=xxx value to --rategovernor? Such as --rate-governor ipe.so:ip=1.2.3.4,port=4000 If that doesn't help, try adding the following line before the bind call in ipe.c (line 218): me->recv.sin_family = AF_INET; > > I think its an IP4 IP6 issue but don're really know where to address it as its been about 10 years since I played in Linux. Currently, UDPCast only supports IPv4 > > Thanks > William > Regards, Alain From roger.lindmark at gmail.com Mon Aug 27 06:52:16 2012 From: roger.lindmark at gmail.com (Roger Lindmark) Date: Mon, 27 Aug 2012 06:52:16 +0200 Subject: [Udpcast] Uninitialized memory read Message-ID: Hello, Attached diff fixes two places where uninitialized memory are accessed. The cause is found in the hello struct where mcastAddr allocates 16 bytes, but copyToMessage does not fill all space in the struct. --- a/udpcast-20120424/udps-negotiate.c +++ b/udpcast-20120424/udps-negotiate.c @@ -47,6 +47,9 @@ static int sendConnectionReply(participantsDb_t db, unsigned int rcvbuf) { struct connectReply reply; + /* zero all data in reply struct */ + memset (&reply, 0, sizeof(reply)); + if(rcvbuf == 0) rcvbuf = 65536; @@ -83,6 +86,10 @@ static int sendConnectionReply(participantsDb_t db, void sendHello(struct net_config *net_config, int sock, int streaming) { struct hello hello; + + /* zero all data in hello struct */ + memset(&hello, 0, sizeof(hello)); + /* send hello message */ if(streaming) hello.opCode = htons(CMD_HELLO_STREAMING); Regards / Roger