From: Hangbin Liu <liuhangbin@gmail.com>
To: netdev@vger.kernel.org
Cc: David Miller <davem@davemloft.net>, Hangbin Liu <liuhangbin@gmail.com>
Subject: [PATCH net 1/2] igmp: fix incorrect unsolicit report count when join group
Date: Wed, 29 Aug 2018 18:06:09 +0800 [thread overview]
Message-ID: <1535537171-24533-3-git-send-email-liuhangbin@gmail.com> (raw)
In-Reply-To: <1535537171-24533-1-git-send-email-liuhangbin@gmail.com>
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: 1da177e4c3f41 ("Linux-2.6.12-rc2")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
---
net/ipv4/igmp.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index cf75f89..deb1f82 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -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);
--
2.5.5
next prev parent reply other threads:[~2018-08-29 14:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-29 10:06 [PATCH net 0/2] igmp: fix two incorrect unsolicit report count issues Hangbin Liu
2018-08-29 10:06 ` [PATCH net 1/2] igmp: fix incorrect unsolicit report count when join group Hangbin Liu
2018-08-29 10:06 ` Hangbin Liu [this message]
2018-08-29 10:06 ` [PATCH net 2/2] igmp: fix incorrect unsolicit report count after link down and up Hangbin Liu
2018-08-29 10:06 ` Hangbin Liu
2018-08-29 11:08 ` [PATCH net 0/2] igmp: fix two incorrect unsolicit report count issues Hangbin Liu
2018-09-02 20:39 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1535537171-24533-3-git-send-email-liuhangbin@gmail.com \
--to=liuhangbin@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).