igmp: fix incorrect unsolicit report count when join group
commit 4fb7253e4f9a8f06a986a3b317e2f79d9b43d552 upstream.
We should not start timer if im->unsolicit_count equal to 0 after decrease.
Or we will send one more unsolicit report message. i.e. 3 instead of 2 by
default.
Fixes: 1da177e4c3
("Linux-2.6.12-rc2")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
This commit is contained in:
parent
39a1d7828f
commit
76f77a4dcf
|
@ -779,10 +779,9 @@ static void igmp_timer_expire(unsigned long data)
|
|||
spin_lock(&im->lock);
|
||||
im->tm_running = 0;
|
||||
|
||||
if (im->unsolicit_count) {
|
||||
im->unsolicit_count--;
|
||||
if (im->unsolicit_count && --im->unsolicit_count)
|
||||
igmp_start_timer(im, unsolicited_report_interval(in_dev));
|
||||
}
|
||||
|
||||
im->reporter = 1;
|
||||
spin_unlock(&im->lock);
|
||||
|
||||
|
|
Loading…
Reference in New Issue