[EMAIL PROTECTED] wrote on 08/13/2006 08:44:05 PM: > From: "Michal Ruzicka" <[EMAIL PROTECTED]> > Date: Fri, 11 Aug 2006 12:04:53 +0100 > > > You are absolutely right, I just failed to notice that -ENODEV return value > > from ip_mc_del_src()/ip_mc_leave_src() is ignored. > > Here comes the patch: > ... > > > Also, ip_mc_leave_group() has the same issue; looks > > > like it just needs the "if (in_dev)" removed before the call to > > > ip_mc_leave_src(). > > > > In fact it is a slightly different issue, there is no leak in this > > function. Rather the function completely fails to leave a multicast > > group joined on an interface that does not exist any more. > ... > > Here comes a patch for that: > > Both of these fixes look fine to me. David?
The first patch in that, yes. Acked-by: David L Stevens <[EMAIL PROTECTED]> I'm not sure the second one is quite right. The case of concern is where an interface is deleted. If you joined (or left) the group by address and then deleted the interface, then you wouldn't match the index (which wouldn't be set) so the leave wouldn't work, still. Also, if you passed a completely bogus ifindex, it should return ENODEV, but with the patch it would return EADDRNOTAVAIL it appears. So, I think the second patch needs some more work. I'll look at it some more and see if I can suggest something better. +-DLS - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html