Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2978895imu; Sun, 9 Dec 2018 14:09:55 -0800 (PST) X-Google-Smtp-Source: AFSGD/WWVu8R7U6BGO9hkz4cS+6tMfGayz2wdQx794wiORT+rxxmJr+/mJkISPN+kIN1EsPycB74 X-Received: by 2002:a65:6094:: with SMTP id t20mr8727161pgu.285.1544393394953; Sun, 09 Dec 2018 14:09:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544393394; cv=none; d=google.com; s=arc-20160816; b=c0FSnd6kS5kPCLwu2Y4LYAsoqlBpKes0PSk6GVfqSbehsFP+yXzXBQuotPcPo+d61i HCpbB48M0bZgIodnccQb9Pv7sV7wB/+uIlEWjEzkIIQH34n4bqqbBZtbUVfFEMRa2Elk 2BN8H1t26LXfpjBCArgP4Vq5yi/9+CiXSDUauXXA30VblAy4hUoITI5JVJWMgA7L3idj 9o9ZetVQd+LO3Honq3Cr880/Opp1UXmt/7roihfrCbfm50mytZnLA7Xlqk8/Y+xXIAbd g/2c+uWkcpj1XSERCi9xdgjwXSabPAnMzZniXlSW0E6gLwfpja9O++ibEq7ABgTk+Sfv NcJQ== 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=GJCLO9wJJzAWtvLykbZW9zriZ0JH54Xk8Z46cTvoBkI=; b=LaoAJmEHb5ypI+cYumWhNVlYW1D4wtucFu0xM9y1gWyzdWeVQBA6/tD14FVWTWhgA7 CPt8zijDtHWpw9jrwmRxflM9Zq4eTA6uv1+gtve09nNtGvAqtxLjDEi6Rfvbz2a4FB9r 6BdOgd0e6dZIBwKlqt9DPP7BT1/2oZVdxFwodarXcK3lta59EpUqJJV6vhsvTGFLrdwD c9XfA1VBjIm1Z2oXW8swNkTANIcqm73rBy5AMy1fnMl2HaD706lfN1vdnzeUZLMKVFc9 kmAe/yi7Gi4+s4afqY+SPdD8h+QWX5OGvLJXhiN0KM040mHrbDiqdzc/Q0zI6bulF4Zb ibqQ== 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 s5si8181589plp.139.2018.12.09.14.09.39; Sun, 09 Dec 2018 14:09:54 -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 S1727833AbeLIWG5 (ORCPT + 99 others); Sun, 9 Dec 2018 17:06:57 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:37140 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727816AbeLIWGw (ORCPT ); Sun, 9 Dec 2018 17:06:52 -0500 Received: from pub.yeoldevic.com ([81.174.156.145] helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gW738-0002ir-GW; Sun, 09 Dec 2018 21:55:43 +0000 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1gW72f-0003Sp-6G; Sun, 09 Dec 2018 21:55:13 +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, "Hangbin Liu" , "David S. Miller" Date: Sun, 09 Dec 2018 21:50:33 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) X-Patchwork-Hint: ignore Subject: [PATCH 3.16 181/328] igmp: fix incorrect unsolicit report count after link down and up In-Reply-To: X-SA-Exim-Connect-IP: 81.174.156.145 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.62-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Hangbin Liu commit ff06525fcb8ae3c302ac1319bf6c07c026dea964 upstream. 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 Signed-off-by: David S. Miller [bwh: Backported to 3.16: - Keep using constant IGMP_Unsolicited_Report_Count - Adjust context] Signed-off-by: Ben Hutchings --- --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c @@ -1256,6 +1256,8 @@ static void igmp_group_added(struct ip_m if (in_dev->dead) return; + + im->unsolicit_count = IGMP_Unsolicited_Report_Count; if (IGMP_V1_SEEN(in_dev) || IGMP_V2_SEEN(in_dev)) { spin_lock_bh(&im->lock); igmp_start_timer(im, IGMP_Initial_Report_Delay); @@ -1360,7 +1362,6 @@ void ip_mc_inc_group(struct in_device *i spin_lock_init(&im->lock); #ifdef CONFIG_IP_MULTICAST setup_timer(&im->timer, &igmp_timer_expire, (unsigned long)im); - im->unsolicit_count = IGMP_Unsolicited_Report_Count; #endif im->next_rcu = in_dev->mc_list;