Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1004766pxb; Wed, 1 Sep 2021 15:04:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJHG28zl9OeeC9VeVFq95mjX+axwRpCXD2KSZIYh5RYDJg+M9a5W0WDb6ifToawB+o8KX9 X-Received: by 2002:a6b:7710:: with SMTP id n16mr10071iom.101.1630533864128; Wed, 01 Sep 2021 15:04:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630533864; cv=none; d=google.com; s=arc-20160816; b=BMW/YkmdfChv6JyvTcqoxNnIdHy4srRXfA1bb/3x4eYAIwxwG/z3N6Uf4Z8VZ6psm/ AkFPeIcXNgNItihZgTDBAIG1hATvNXu0Dtn83b4jlKHr5uwwYF6m61a7rn3/0VkyYtVa wuaSgMcHnS4iD8UvvaPH+e3grzLdqt8ae5a5o9c91I9GnaexwQvSRw71N3+xvdpXQDHW jgvm4lf4H/4Lh5GidT7H+ZZLPKfjzX8OVe8Ut01UggNebcnKdpi8LD2Y9JvHWp2iiiyj CNEfhvfjkk2usZzuSpUUNxEs8HRosUxF42JP0UjJbb0JEg9VMPjZH9qspR7KF0EDDlQe Mo8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=VBIyzeozZp6O1URQIpkkuT1Q8Au9MpxyawDWDqhKJRg=; b=zzg23ty0xhmvUTjr/dM7rq8dTd+w9qdFWJmYd3N3CqDykG6WscmN8lsSq9y0gKHnsq UdT9A85Uf43/OY6XPp1R+XBE2dWMROCh+qxsFPWW1xEGFSLcltTZklFv8bJtq2tOSNuL WrJ6fbafrJOoYXwNeRN5F7qvuX4S1ouiZ2KckiC5PIj+MgvJH/qwJcI2WxRvZ5FSLXsU jP0D8nbh0kd3vA+4fsrtn7/LvnA9Xb1p3nPXE1HgJUjwH0nZi0VTid32HjYhAd1Psjcj FokZ+YWlGQnrk6hYmb4dI6u1VQDCZDpGUsKpl8QSmp3HIUmQX/begCY4BSM0gvye4Ldo 2W7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xuyIdkd6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x8si20520ill.70.2021.09.01.15.04.12; Wed, 01 Sep 2021 15:04:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xuyIdkd6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345540AbhIAMqc (ORCPT + 99 others); Wed, 1 Sep 2021 08:46:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:40946 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345148AbhIAMkx (ORCPT ); Wed, 1 Sep 2021 08:40:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D08BC611AF; Wed, 1 Sep 2021 12:37:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1630499830; bh=iLQGVg6pHipjmn7NC187GwCpG6R5Mk5ybFqP+dJLqoM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xuyIdkd6KobYLsSET37d1+Y53yMLwb91t0m0QFhpX/ABqIPvY9RtcwX1898FTAZiK 9l43PL6dNamg13pP1svP8Jigu+Znp/zdxwP+TrguMIbWx8p2KR1HKhLoS13PHHGaf5 emIKLa9uNOBWTuTI7wKyuSge8NsmY8SouVDXuux8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, DENG Qingfang , Vladimir Oltean , "David S. Miller" Subject: [PATCH 5.10 095/103] net: dsa: mt7530: fix VLAN traffic leaks again Date: Wed, 1 Sep 2021 14:28:45 +0200 Message-Id: <20210901122303.730572047@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210901122300.503008474@linuxfoundation.org> References: <20210901122300.503008474@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: DENG Qingfang commit 7428022b50d0fbb4846dd0f00639ea09d36dff02 upstream. When a port leaves a VLAN-aware bridge, the current code does not clear other ports' matrix field bit. If the bridge is later set to VLAN-unaware mode, traffic in the bridge may leak to that port. Remove the VLAN filtering check in mt7530_port_bridge_leave. Fixes: 474a2ddaa192 ("net: dsa: mt7530: fix VLAN traffic leaks") Fixes: 83163f7dca56 ("net: dsa: mediatek: add VLAN support for MT7530") Signed-off-by: DENG Qingfang Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/dsa/mt7530.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -1161,11 +1161,8 @@ mt7530_port_bridge_leave(struct dsa_swit /* Remove this port from the port matrix of the other ports * in the same bridge. If the port is disabled, port matrix * is kept and not being setup until the port becomes enabled. - * And the other port's port matrix cannot be broken when the - * other port is still a VLAN-aware port. */ - if (dsa_is_user_port(ds, i) && i != port && - !dsa_port_is_vlan_filtering(dsa_to_port(ds, i))) { + if (dsa_is_user_port(ds, i) && i != port) { if (dsa_to_port(ds, i)->bridge_dev != bridge) continue; if (priv->ports[i].enable)