Skip to contentSkip to conversation

IPv6 multicast in 2.4.25 broken?

DISCUSSION Ignacy Gawedzki 3 participants 3 messages Mar 24, 2004 – Mar 31, 2004 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

Hi,

It seems that simple multicast support in IPv6 has ceased working starting at kernel version 2.4.25-pre4. More specifically, receiving multicast packets (those with destination address ff05::1 or ff02::1) is broken (read: sending is okay). The same binary run on kernels 2.4.24 and earlier works with no problem.

I tried as many combinations of USAGI patches and kernel versions as I could, but cannot figure the exact source of the problem. I did not inspect the diffs with enough attention, though.

Another funny thing is that the changelog for version 2.4.25-pre4 doesn't mention any change to IPv6 code.

Did anyone have similar experience and or suggestions?

I have not subscribed to the linux-kernel list, because of its high traffic, so please CC me the replies.

Thanks,

Ignacy

PS: The detailed way in which I prepare the socket is the following:

Open a UDP socket in IPv6 protocol family.

Bind it to network interface using SO_BINDTODEVICE.

Set the multicast network interface using IPV6_MULTICAST_IF.

Bind it to the network interface's address (which is set manually to fec0::1).

Set the multicast hops with IPV6_MULTICAST_HOPS to 1.

Set the multicast membership to ff02::1 (or ff05::1) using IPV6_ADD_MEMBERSHIP.

Unset the multicast loop using IPV6_MULTICAST_LOOP.

Note: the same socket is used to send and receive multicast packets.

Signature · 1 line
To err is human, to moo bovine.

A message that is not in the archive (sent off-list or not yet received): OFE1BE522F.02DB03E7-ON88256E67.00767AD5-88256E67.0077576D@us.ibm.com

#2 lore raw

Re: (usagi-users 02870) Re: IPv6 multicast in 2.4.25 broken?

On Tue, Mar 30, 2004 at 01:47:06PM -0800, thus spake David Stevens:

Quoted 3 lines

Can you reproduce this in a small test program and send me the source? Also, the contents of /dev/proc/igmp6 and any arguments you ran the program with would be helpful.

Not at this time, as I would have to reinstall a 2.4.25 kernel. But I plan to do the testing soon.

Quoted 5 lines

At first I thought it might be that you have an MLD-snooping switch that doesn't understand MLDv2 packets, but ff02::1 is the all-nodes address which all hosts join, and which is not advertised at all. That should work if you're receiving any multicasts at all.

Well, I see those packets with tcpdump on both the sending and receiving interfaces, so no ethernet equipment is involved. Moreover, the same code works perfectly on 2.4.24, which should indicate that there are some changes between the two (more precisely between 2.4.24 and 2.4.25-pre4) that break something. Somehow the multicast packets are received but not relayed to the socket...

Signature · 3 lines
 "The whole problem with the world is that fools and fanatics are
   always so certain of themselves, and wiser people so full of doubts."
                                                 - Bertrand Russell

A message that is not in the archive (sent off-list or not yet received): 20040331220129.d245fc9%[email protected]

#4 lore raw

Re: (usagi-users 02872) Re: IPv6 multicast in 2.4.25 broken?

On Wed, Mar 31, 2004 at 10:01:29PM +0900, thus spake Takashi Hibi:

Quoted 5 lines

Isn't it related to the patch (usagi-users 02627)?
http://www2.linux-ipv6.org/ml/usagi-users/msg02626.html

If the socket is bound to non-multicast address, it can't receive multicast packets.

This is why it doesn't work anymore, as it shouldn't have in the first place. Thanks for pointing this out. I did not know that source address selection is automatic, depending on the multicast address prefix (ff05::/16, ff02::/16, etc) and the IPV6_MULTICAST_IF option, so I instinctively did bind the socket to the unicast address and not the multicast address.

Now it seems to work like a charm. =)

Thanks,

Ignacy

Signature · 1 line
To err is human, to moo bovine.