]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dsa: tag_dsa: Fix mask for trunked packets
authorAndrew Lunn <andrew@lunn.ch>
Sun, 3 Oct 2021 15:50:53 +0000 (17:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Oct 2021 07:42:04 +0000 (09:42 +0200)
commit58f0e59efa34ceea0253e58e4b27e44423767728
tree0c74c837cf2dc0149dbbd91e3406e496daa9f1ee
parent5dc24f3e08419d01ce0dcd08e9472472ede9988f
dsa: tag_dsa: Fix mask for trunked packets

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