]> git.baikalelectronics.ru Git - kernel.git/commit
igmp: do not remove igmp souce list info when set link down
authorHangbin Liu <liuhangbin@gmail.com>
Mon, 14 Nov 2016 08:16:28 +0000 (16:16 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Nov 2016 00:51:16 +0000 (19:51 -0500)
commitcb3bac8948c0c6f36d6a0fcdc2c2b2cb227c8e49
tree8b8889b8b095a7a9330f9db27846a4cd64956436
parenta791798e09a427bd98de3ba4ab70867a3805002c
igmp: do not remove igmp souce list info when set link down

In commit 4e724cf3a1fe ("igmp: call ip_mc_clear_src..."), we forgot to remove
igmpv3_clear_delrec() in ip_mc_down(), which also called ip_mc_clear_src().
This make us clear all IGMPv3 source filter info after NETDEV_DOWN.
Move igmpv3_clear_delrec() to ip_mc_destroy_dev() and then no need
ip_mc_clear_src() in ip_mc_destroy_dev().

On the other hand, we should restore back instead of free all source filter
info in igmpv3_del_delrec(). Or we will not able to restore IGMPv3 source
filter info after NETDEV_UP and NETDEV_POST_TYPE_CHANGE.

Fixes: 4e724cf3a1fe ("igmp: call ip_mc_clear_src() only when ...")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/igmp.c