(usagi-users 03387) Re: MLDv2 linux implementation questions

David Stevens <[email protected]>
Newsgroups gmane.linux.ipv6.usagi.users
Message-ID <OFFB935617.F0CE18F7-ON88257020.0001F438-88257020.00043139@us.ibm.com>
Hoerdt,
        Thanks for the program, I've reproduced the problem, and
it appears to be a long-standing bug in the multicast code. Using
source filters just makes it happen sooner.
        I'll work on a patch to fix this issue; in the meantime, you
can avoid it by doing a regular "leave group" on the group
address, rather than the delta-based MCAST_LEAVE_SOURCE_GROUP,
which will not delete the existing membership.

                                +-DLS

gory details, if you're interested:
        The "join" code does not check if you have already
joined the same group on that socket, but allocates a new
multicast structure (and filter too, in your case) for every join.
The "leave"'s you're doing delete the source filter entry, but
do not delete the multicast group membership, only add an
"INCLUDE,empty" filter.
        So, each iteration allocates a new multicast group
structure and source filter associated with the socket, until
you run out of  space.
        Fix should be to check if the socket is already a member
of the group and don't allocate a new multicast address
structure if it is.
        Pre-MLDv2, a series of joins would result in the
same problem, but would've taken longer since there is
no source filter allocation to go with the multicast structures
it is allocating.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.