Re: [PATCH net] ipv4: igmp: Allow removing groups from a removed interface

2015-11-30 Thread Andrew Lunn
On Mon, Nov 30, 2015 at 11:01:48AM -0500, David Miller wrote: > From: Andrew Lunn > Date: Wed, 25 Nov 2015 21:15:36 +0100 > > > @@ -2126,7 +2126,7 @@ int ip_mc_leave_group(struct sock *sk, struct > > ip_mreqn *imr) > > ASSERT_RTNL(); > > > > in_dev = ip_mc_find_dev(net, imr); > > - i

Re: [PATCH net] ipv4: igmp: Allow removing groups from a removed interface

2015-11-30 Thread David Miller
From: Andrew Lunn Date: Wed, 25 Nov 2015 21:15:36 +0100 > @@ -2126,7 +2126,7 @@ int ip_mc_leave_group(struct sock *sk, struct ip_mreqn > *imr) > ASSERT_RTNL(); > > in_dev = ip_mc_find_dev(net, imr); > - if (!in_dev) { > + if (!imr->imr_ifindex && !imr->imr_address.s_addr &&

[PATCH net] ipv4: igmp: Allow removing groups from a removed interface

2015-11-25 Thread Andrew Lunn
When a multicast group is joined on a socket, a struct ip_mc_socklist is appended to the sockets mc_list containing information about the joined group. If the interface is hot unplugged, this entry becomes stale. Prior to 52ad353a5344f "(igmp: fix the problem when mc leave group") it was possible