Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp338234ybl; Fri, 9 Aug 2019 06:48:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqxnlL6OVneYy6PqMg5Cxg0wACw8uZSoYmY3uINOmR6mwGfMGfpKntVlLdxtk/DGiXGoG+c+ X-Received: by 2002:a63:2744:: with SMTP id n65mr17362266pgn.277.1565358509774; Fri, 09 Aug 2019 06:48:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565358509; cv=none; d=google.com; s=arc-20160816; b=CDn6L/jxxYzviheeK/i9YvTGfusa9dB37y3zmkJlT8JOpOB8JlBQ0jY6EN5ETnkRoK 9m7j3llYt2OeZp4BkWwyMGNj/WV2nL7A58I3C9rp4Na0i8zLXpv/cpFzxeeGD0G5I/X8 igjFxfjBKocYYbuikzF1SAHj2RnODdBLMtsoXRl7MkeZIieEvjJ2g9p4U6UrHYydZXNT TNiGBFSLUNtG3OGV7L61UQVQkt2FWOYhKHVG71JkGWn4Fhllic/uwdflakvWk3HtTzoq 6ZQW05Bd5HemI0Zsf0JCD23GDhEEOLLIvPwKKOvGyEEBYut8GMnQC31a3RyFYaqh76in bIbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=auZR3eYoLesD9NSCxR20DyESKxQMQ04rn9xf8p0IcwE=; b=rN7gmRXGBjBzSklcTH8e0NR1eydxZa67BcjpHM3D2MM2n5H6unSE5+tHWuDRUJNqsJ Ori7tYHFCaGTDZJTkyucAk2ybsARGWrpRB3Ec4T1HJYlTpUn6n9xLbUa1Yl43VeSM52H S4nRAi0E38IfLaxRoh34ohfO+eECanWJlKRPd4xJ03WjstBfZYScxviZm7GGfbhkUThZ 5aOjJdNRO1u15Kd4TyfJF5BdpYOv7KT4k6rffBACD0L9f7go9cyT10dIcCmfb5NAWeUk 7hEHfLrFZR20W/dcBIn/TF71RSgjv02Z+hvEsrSP1E8tMoZMOaDolQbTCahW+wbYJE3A fVGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ybN8nFUI; 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 r16si52670149pgv.466.2019.08.09.06.48.13; Fri, 09 Aug 2019 06:48:29 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=ybN8nFUI; 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 S2407202AbfHINrE (ORCPT + 99 others); Fri, 9 Aug 2019 09:47:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:36900 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2407191AbfHINrB (ORCPT ); Fri, 9 Aug 2019 09:47:01 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C262C214C6; Fri, 9 Aug 2019 13:46:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565358420; bh=VfjukXimkLBJ7zj57fr8FMKr1+qhPqWQu8e8nmqmtAM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ybN8nFUI+vUjfwX8073IXaA9lucszVWGe1JoOFuAkum/0Kl2TXYQf1Ick0vBGnqGF GmZXpdWefFg3cBlvuJzcw1jG77O3V03CASk8fgeAnGp9lFAGCFwkq086NSZdaKaiFm yzTopgzOFwCBLkTMt5PLfYD0wUI4tUKv5ZleiYO0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nikolay Aleksandrov , "David S. Miller" Subject: [PATCH 4.9 17/32] net: bridge: mcast: dont delete permanent entries when fast leave is enabled Date: Fri, 9 Aug 2019 15:45:20 +0200 Message-Id: <20190809133923.514427197@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190809133922.945349906@linuxfoundation.org> References: <20190809133922.945349906@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nikolay Aleksandrov [ Upstream commit 5c725b6b65067909548ac9ca9bc777098ec9883d ] When permanent entries were introduced by the commit below, they were exempt from timing out and thus igmp leave wouldn't affect them unless fast leave was enabled on the port which was added before permanent entries existed. It shouldn't matter if fast leave is enabled or not if the user added a permanent entry it shouldn't be deleted on igmp leave. Before: $ echo 1 > /sys/class/net/eth4/brport/multicast_fast_leave $ bridge mdb add dev br0 port eth4 grp 229.1.1.1 permanent $ bridge mdb show dev br0 port eth4 grp 229.1.1.1 permanent < join and leave 229.1.1.1 on eth4 > $ bridge mdb show $ After: $ echo 1 > /sys/class/net/eth4/brport/multicast_fast_leave $ bridge mdb add dev br0 port eth4 grp 229.1.1.1 permanent $ bridge mdb show dev br0 port eth4 grp 229.1.1.1 permanent < join and leave 229.1.1.1 on eth4 > $ bridge mdb show dev br0 port eth4 grp 229.1.1.1 permanent Fixes: ccb1c31a7a87 ("bridge: add flags to distinguish permanent mdb entires") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/bridge/br_multicast.c | 3 +++ 1 file changed, 3 insertions(+) --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c @@ -1489,6 +1489,9 @@ br_multicast_leave_group(struct net_brid if (p->port != port) continue; + if (p->flags & MDB_PG_FLAGS_PERMANENT) + break; + rcu_assign_pointer(*pp, p->next); hlist_del_init(&p->mglist); del_timer(&p->timer);