mld: do not remove mld souce list info when set link down
authorHangbin Liu <liuhangbin@gmail.com>
Thu, 12 Jan 2017 13:19:37 +0000 (21:19 +0800)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 16 Mar 2017 02:18:58 +0000 (02:18 +0000)
commit7c906c367c7dacf6f641e70910f11acd7195e8e9
treee07b514310cc9badcdf28d039af90f1f53e43e38
parentbd1b664a19403ede448d29c87b2f23796bc7a577
mld: do not remove mld souce list info when set link down

commit 1666d49e1d416fcc2cce708242a52fe3317ea8ba upstream.

This is an IPv6 version of commit 24803f38a5c0 ("igmp: do not remove igmp
souce list..."). In mld_del_delrec(), we will restore back all source filter
info instead of flush them.

Move mld_clear_delrec() from ipv6_mc_down() to ipv6_mc_destroy_dev() since
we should not remove source list info when set link down. Remove
igmp6_group_dropped() in ipv6_mc_destroy_dev() since we have called it in
ipv6_mc_down().

Also clear all source info after igmp6_group_dropped() instead of in it
because ipv6_mc_down() will call igmp6_group_dropped().

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to 3.2:
 - Timer code moved around in ipv6_mc_down() is different
 - Adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
net/ipv6/mcast.c