igmp: fix incorrect unsolicit report count after link down and up
authorHangbin Liu <liuhangbin@gmail.com>
Wed, 29 Aug 2018 10:06:10 +0000 (18:06 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 2 Sep 2018 20:39:37 +0000 (13:39 -0700)
commitff06525fcb8ae3c302ac1319bf6c07c026dea964
tree825ebee65cc163c698c708641f43af49c228ccdd
parent4fb7253e4f9a8f06a986a3b317e2f79d9b43d552
igmp: fix incorrect unsolicit report count after link down and up

After link down and up, i.e. when call ip_mc_up(), we doesn't init
im->unsolicit_count. So after igmp_timer_expire(), we will not start
timer again and only send one unsolicit report at last.

Fix it by initializing im->unsolicit_count in igmp_group_added(), so
we can respect igmp robustness value.

Fixes: 24803f38a5c0b ("igmp: do not remove igmp souce list info when set link down")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/igmp.c