[lkml]   [2011]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 1/1] igmp: fix ip_mc_clear_src to not reset ip_mc_list->sf{mode,count}
> From: Veaceslav Falico <>
> Date: Sun, 15 May 2011 18:59:45 +0200
> > ip_mc_clear_src resets the imc->sfcount and imc->sfmode, without
taking into
> > account the current number of sockets listening on that multicast
> struct, which
> > can lead to bogus routes for local listeners.
> >
> > On NETDEV_DOWN/UP event, if there were 3 multicast listeners for
> that interface's
> > address, the imc->sfcount[MCAST_EXCLUDE] will be reset to 1. And
> after that a
> > listener socket destroys, multicast traffic will not be delivered to
> > listeners because __mkroute_output drops the local flag for the route
> > checking ip_check_mc).

On NETDEV_DOWN, all group memberships are dropped.
is simply freeing all the source filters and turning it into an "EXCLUDE
membership (ie, the same as an ordinary join without source filtering).
ordinarily happens when you are deleting the group entirely (when the
count goes to 0), but is also called on device down.
This patch is not appropriate; when the groups are deleted, the
filters are deleted, and the filter counts have to reflect the source
in the list. If you had an "INCLUDE A" filter, for example, that would
an "INCLUDE nobody" filter and drop all traffic (from A or not). The
of source filters is not related to the number of listener sockets, and
function of ip_mc_clear_src() is to make it 0 (with the special case of 1
EXCLUDE), so setting the counts has to be done for proper functioning.
I don't quite understand the problem you're trying to solve here
when the device comes back up, the group should be re-added with
{EXCLUDE,nobody} and
ip_check_mc() should therefore return 1. Of course, while the interface is
down, the mc_list is empty and it'd return 0 in that case.
Do you have a small test program to demonstrate the problem?
For the patch, I have to say NACK.


 \ /
  Last update: 2011-05-16 22:45    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean