lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211003155141.2241314-1-andrew@lunn.ch>
Date:   Sun,  3 Oct 2021 17:51:41 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     netdev <netdev@...r.kernel.org>
Cc:     Tobias Waldekranz <tobias@...dekranz.com>,
        Vladimir Oltean <vladimir.oltean@....com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Andrew Lunn <andrew@...n.ch>
Subject: [PATCH net] dsa: tag_dsa: Handle !CONFIG_BRIDGE_VLAN_FILTERING case

If CONFIG_BRIDGE_VLAN_FILTERING is disabled, br_vlan_enabled() is
replaced with a stub which returns -EINVAL. As a result the tagger
drops the frame. Rather than drop the frame, use a pvid of 0.

Fixes: d82f8ab0d874 ("net: dsa: tag_dsa: offload the bridge forwarding process")
Signed-off-by: Andrew Lunn <andrew@...n.ch>
---
 net/dsa/tag_dsa.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/dsa/tag_dsa.c b/net/dsa/tag_dsa.c
index e5127b7d1c6a..8daa8b7787c0 100644
--- a/net/dsa/tag_dsa.c
+++ b/net/dsa/tag_dsa.c
@@ -149,7 +149,8 @@ static struct sk_buff *dsa_xmit_ll(struct sk_buff *skb, struct net_device *dev,
 		 * inject packets to hardware using the bridge's pvid, since
 		 * that's where the packets ingressed from.
 		 */
-		if (!br_vlan_enabled(br)) {
+		if (IS_ENABLED(CONFIG_BRIDGE_VLAN_FILTERING) &&
+		    !br_vlan_enabled(br)) {
 			/* Safe because __dev_queue_xmit() runs under
 			 * rcu_read_lock_bh()
 			 */
-- 
2.33.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ