Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4fb7253e authored by Hangbin Liu's avatar Hangbin Liu Committed by David S. Miller
Browse files

igmp: fix incorrect unsolicit report count when join group



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: 1da177e4 ("Linux-2.6.12-rc2")
Signed-off-by: default avatarHangbin Liu <liuhangbin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 93bbadd6
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -820,10 +820,9 @@ static void igmp_timer_expire(struct timer_list *t)
	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);