summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2021-10-03 18:50:53 +0300
committerDavid S. Miller <davem@davemloft.net>2021-10-04 15:43:55 +0300
commitb44d52a50bc6f191f0ae03f65de8401f3ef039b3 (patch)
treea2a40619eddbfa6cc988c3b35514bb4db58e61f4 /net
parent7cd8b1542a7ba0720c5a0a85ed414a122015228b (diff)
downloadlinux-b44d52a50bc6f191f0ae03f65de8401f3ef039b3.tar.xz
dsa: tag_dsa: Fix mask for trunked packets
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>
Diffstat (limited to 'net')
-rw-r--r--net/dsa/tag_dsa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dsa/tag_dsa.c b/net/dsa/tag_dsa.c
index 77d0ce89ab77..e5127b7d1c6a 100644
--- a/net/dsa/tag_dsa.c
+++ b/net/dsa/tag_dsa.c
@@ -210,7 +210,7 @@ static struct sk_buff *dsa_rcv_ll(struct sk_buff *skb, struct net_device *dev,
cmd = dsa_header[0] >> 6;
switch (cmd) {
case DSA_CMD_FORWARD:
- trunk = !!(dsa_header[1] & 7);
+ trunk = !!(dsa_header[1] & 4);
break;
case DSA_CMD_TO_CPU: