Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3318503imu; Sun, 11 Nov 2018 12:15:32 -0800 (PST) X-Google-Smtp-Source: AJdET5f8a7THOC1KfMvXd+FjJSHUcktgJtQic8Le41OXf7i/T7DJJH9EqF6pCZ1ZerZxUxOCrMEO X-Received: by 2002:a63:86c2:: with SMTP id x185mr13864427pgd.230.1541967332284; Sun, 11 Nov 2018 12:15:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541967332; cv=none; d=google.com; s=arc-20160816; b=AHCrz1SYbOgViN8MTKLdbJ1phEmyGuo3pmQUgAyCCQITICEjUD7Qk5I7e98u4mFmBU qH/R72SKJRFTyZkYqVDOnFX42TfzAKeQGl3BPALVpEaqYTFzHDyyJD7ISkBq8AWF02lO BhEqcKWaoXWmlpsvZYcbW3yLSoUumMzjqd6ooryHzaIZqnMghAxU5KCjDDekUDR8t3+t 0c8raBaVvAyLI0k6537kPQBtFa7J++23Qlyta8/dFNoO7B0XHx1K3k07wPl/I1CoWW3Y bPdd2CTLDRw/1M4OlwQaIB6W+gph2rx6EZx4Xa27SC/dRiw/CdsRbIYI2F4AQj98EV6H J5rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=aElACJugE7vTytQ8B4aKpNt/8EnR1RvYzzkHwgihIX8=; b=mZ9hpTYFS0vHhQg8VspGuLQsNvJo1F2t5+9w/YMx8IQgsqQ39on8cNCxZtXI7jji/3 3PP6JsZ2DmhaCt7D6ayMQWMUgDR0l9/7IIw64GkfJptigYeRJUNo5pDdXGjjoLagVuvC TyzYlnGAsYUh3oteZ5ptUrYKMN/3EFH+dZvibj68voJwmvwGo2yKsPzRKv8ueMGtT88B Jum/+kjvhAXQgIl9T/iLpEyEy7j1gdvHZyRX8PZxmpwtZb5ibE36Cdxb4Nlalj+uvhF9 I/DXFLW2mmu8mGfyeJV0KOGJOH0rsa5EhNoxrVHLNoCv5Y62BUoW9QVFiUacmsn/E9Vh I9KQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y6-v6si16193540pfy.29.2018.11.11.12.15.16; Sun, 11 Nov 2018 12:15:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731739AbeKLGEZ (ORCPT + 99 others); Mon, 12 Nov 2018 01:04:25 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:52922 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729602AbeKLGEY (ORCPT ); Mon, 12 Nov 2018 01:04:24 -0500 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gLvsz-0000oM-0Z; Sun, 11 Nov 2018 19:59:09 +0000 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1gLvsT-0001cV-PQ; Sun, 11 Nov 2018 19:58:37 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "David S. Miller" , "Hangbin Liu" Date: Sun, 11 Nov 2018 19:49:05 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 185/366] ipv6: mcast: fix unsolicited report interval after receiving querys In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.61-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Hangbin Liu commit 6c6da92808442908287fae8ebb0ca041a52469f4 upstream. After recieving MLD querys, we update idev->mc_maxdelay with max_delay from query header. This make the later unsolicited reports have the same interval with mc_maxdelay, which means we may send unsolicited reports with long interval time instead of default configured interval time. Also as we will not call ipv6_mc_reset() after device up. This issue will be there even after leave the group and join other groups. Fixes: fc4eba58b4c14 ("ipv6: make unsolicited report intervals configurable for mld") Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings --- net/ipv6/mcast.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c @@ -2058,7 +2058,8 @@ void ipv6_mc_dad_complete(struct inet6_d mld_send_initial_cr(idev); idev->mc_dad_count--; if (idev->mc_dad_count) - mld_dad_start_timer(idev, idev->mc_maxdelay); + mld_dad_start_timer(idev, + unsolicited_report_interval(idev)); } } @@ -2070,7 +2071,8 @@ static void mld_dad_timer_expire(unsigne if (idev->mc_dad_count) { idev->mc_dad_count--; if (idev->mc_dad_count) - mld_dad_start_timer(idev, idev->mc_maxdelay); + mld_dad_start_timer(idev, + unsolicited_report_interval(idev)); } in6_dev_put(idev); } @@ -2428,7 +2430,8 @@ static void mld_ifc_timer_expire(unsigne if (idev->mc_ifc_count) { idev->mc_ifc_count--; if (idev->mc_ifc_count) - mld_ifc_start_timer(idev, idev->mc_maxdelay); + mld_ifc_start_timer(idev, + unsolicited_report_interval(idev)); } in6_dev_put(idev); }