Multicast group memberships lost if eth0 brought down and up

Deron Meranda deron.meranda at gmail.com
Mon Oct 4 08:39:29 UTC 2004


On Sat, 02 Oct 2004 07:49:01 -0400, Ted Kaczmarek <tedkaz at optonline.net> wrote:
> up/down cycling of what?
> Most switches will and should flush all tables on a port state change.
> I am assuming you are in a switch that is doing igmp snooping as well.

Thanks for the response, but my problem is for a normal application
running in user-space, not in the kernel.  IGMP or snooping is not
involved (at least that the application directly knows about).  The
application is only using standard RFC 3542 socket API calls.

What I have is an application program which opens an IPv6 socket,
binds it to a multicast group address and UDP port, and then adds it
to the multicast membership (an IPV6_ADD_MEMBERSHIP socket option). 
Binding allows one to send packets to a multicast group, but only by
setting the socket option can one also receive packets from the group.

The problem occurs when the interface is brought down and then back
up.  The kernel looses track of all of the multicast memberships that
used to be associated with that interface.  But the application is in
no way informed that it has lost its membership; the socket descriptor
is still perfectly valid and will receive no errors.  Packets can
still be sent successfully to the group.  However the application is
now in a state where it can send packets but will never receive them.

I would have expected the kernel to save group memberships when it
goes down and to re-establish memberships when it's brought back up. 
It may not even need to save memberships, since all that information
should be recorded among all the open descriptor structures.  When an
interface comes back up the kernel should do all the IGMP and
device-level registering automatically.  Yes, the network peers will
(and should) see the host leave and rejoin the group, but it should be
transparent to the application; and the application should contrinue
to function correctly once the interface is brought back up.

Or, as a less desirable workaround, provide a way for an application
to be notified when an interface goes down or back up (yes, there are
kernel-level notifications, but nothing available at user-space. that
I know about).

-- 
Deron Meranda




More information about the fedora-list mailing list