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-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon,  7 Nov 2022 19:54:47 +0100
From:   Felix Fietkau <nbd@....name>
To:     netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>
Cc:     linux-kernel@...r.kernel.org
Subject: [PATCH 09/14] flow_dissector: detect DSA using skb->protocol even when VLAN tag is present

Fixes flow dissection with ethernet devices that can combine VLAN rx hwaccel
with DSA, since skb->protocol is set to htons(ETH_P_XDSA) by the network stack.

Signed-off-by: Felix Fietkau <nbd@....name>
---
 net/core/flow_dissector.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
index 25cd35f5922e..43f6bbca7447 100644
--- a/net/core/flow_dissector.c
+++ b/net/core/flow_dissector.c
@@ -970,7 +970,7 @@ bool __skb_flow_dissect(const struct net *net,
 		hlen = skb_headlen(skb);
 #if IS_ENABLED(CONFIG_NET_DSA)
 		if (unlikely(skb->dev && netdev_uses_dsa(skb->dev) &&
-			     proto == htons(ETH_P_XDSA))) {
+			     skb->protocol == htons(ETH_P_XDSA))) {
 			const struct dsa_device_ops *ops;
 			int offset = 0;
 
-- 
2.38.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ