(usagi-users 03427) Re: select() bug on IPv6 multicast SSM socket.
Hoerdt Mickael <[email protected]>
| Newsgroups | gmane.linux.ipv6.usagi.users |
|---|---|
| Message-ID | <[email protected]> |
Ok, I had stupid cute and paste fault in testselect(). Now it works good. I will investigate further then Hoerdt Mickaël Hoerdt Mickael wrote: >Ok the proof of the bug is now there : > >1. download http://clarinet.u-strasbg.fr/~hoerdt/testselect.tgz >2. compile it (make). > >This code contains testselect.c which : > a. create two sockets so1 and so2, bind them and register them to >the same SSM > channel. > b. launch select() on the two sockets and print when data arrive. > >by default it register to the channel 2001:1::1 ff3e::1234, thats a >constant that you can >change. The behavior observed on my box is the following : > >./test_select >2 multicast sockets ready for reading >so1 have data >so2 have data >1 multicast sockets ready for reading >so2 have data >1 multicast sockets ready for reading >so2 have data >1 multicast sockets ready for reading >so2 have data >1 multicast sockets ready for reading >so2 have data > >As you can observe, the first packet is well received, but the others >only arrive >at one socket. I know that it is a very specific particular case, but I >need to have >this in my application (receiving on both sockets), because in my >application the >set of channels joined by sockets may be different over time. > >Thanks, > >Hoerdt Mickaël > > > > > > > >Stig Venaas wrote: > > > >>On Thu, Jun 23, 2005 at 09:35:15AM +0200, Hoerdt Mickael wrote: >> >> >> >> >>>Hi, >>> >>>I have strange behavior in my code : >>> >>>I got two IPv6 UDP sockets, bound to the same port and listening to the >>>same SSM channel (INCLUDE mode). I am using select() to know when packets are coming on it. The >>>thing is that only one socket receive packets is it normal ? does multicast >>>toward sockets bound >>>to the same port and listening to the same group works ? >>> >>> >>> >>> >>It works fine for me on 2.6.11 (without usagi) and also has before. >>Is your problem with select(), does select only include one of the >>sockets in the read set? Or are you indeed not receiving packets? >> >>I only tested ASM though, >> >>Stig >> >> >> >> >> >> > > > >