]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 Oct 2021 08:37:02 +0000 (10:37 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 Oct 2021 08:37:02 +0000 (10:37 +0200)
added patches:
dsa-tag_dsa-fix-mask-for-trunked-packets.patch

queue-5.14/dsa-tag_dsa-fix-mask-for-trunked-packets.patch [new file with mode: 0644]
queue-5.14/series

diff --git a/queue-5.14/dsa-tag_dsa-fix-mask-for-trunked-packets.patch b/queue-5.14/dsa-tag_dsa-fix-mask-for-trunked-packets.patch
new file mode 100644 (file)
index 0000000..a566e66
--- /dev/null
@@ -0,0 +1,35 @@
+From b44d52a50bc6f191f0ae03f65de8401f3ef039b3 Mon Sep 17 00:00:00 2001
+From: Andrew Lunn <andrew@lunn.ch>
+Date: Sun, 3 Oct 2021 17:50:53 +0200
+Subject: dsa: tag_dsa: Fix mask for trunked packets
+
+From: Andrew Lunn <andrew@lunn.ch>
+
+commit b44d52a50bc6f191f0ae03f65de8401f3ef039b3 upstream.
+
+A packet received on a trunk will have bit 2 set in Forward DSA tagged
+frame. Bit 1 can be either 0 or 1 and is otherwise undefined and bit 0
+indicates the frame CFI. Masking with 7 thus results in frames as
+being identified as being from a trunk when in fact they are not. Fix
+the mask to just look at bit 2.
+
+Fixes: 5b60dadb71db ("net: dsa: tag_dsa: Support reception of packets from LAG devices")
+Signed-off-by: Andrew Lunn <andrew@lunn.ch>
+Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/dsa/tag_dsa.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/net/dsa/tag_dsa.c
++++ b/net/dsa/tag_dsa.c
+@@ -176,7 +176,7 @@ static struct sk_buff *dsa_rcv_ll(struct
+       case DSA_CMD_FORWARD:
+               skb->offload_fwd_mark = 1;
+-              trunk = !!(dsa_header[1] & 7);
++              trunk = !!(dsa_header[1] & 4);
+               break;
+       case DSA_CMD_TO_CPU:
index 4c91add604445c11493ac54a0c42f3cf7955604e..6a3bfe688322a96177cfd8cb08b206017b51fb64 100644 (file)
@@ -149,3 +149,4 @@ x86-fpu-restore-the-masking-out-of-reserved-mxcsr-bits.patch
 x86-entry-correct-reference-to-intended-config_64_bit.patch
 x86-entry-clear-x86_feature_smap-when-config_x86_smap-n.patch
 x86-hpet-use-another-crystalball-to-evaluate-hpet-usability.patch
+dsa-tag_dsa-fix-mask-for-trunked-packets.patch