Skip to content

Commit 2c32fc5

Browse files
Noltarigregkh
authored andcommitted
net: dsa: tag_brcm: legacy: fix pskb_may_pull length
[ Upstream commit efdddc4 ] BRCM_LEG_PORT_ID was incorrectly used for pskb_may_pull length. The correct check is BRCM_LEG_TAG_LEN + VLAN_HLEN, or 10 bytes. Fixes: 964dbf1 ("net: dsa: tag_brcm: add support for legacy tags") Signed-off-by: Álvaro Fernández Rojas <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent e653c29 commit 2c32fc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/dsa/tag_brcm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ static struct sk_buff *brcm_leg_tag_rcv(struct sk_buff *skb,
257257
int source_port;
258258
u8 *brcm_tag;
259259

260-
if (unlikely(!pskb_may_pull(skb, BRCM_LEG_PORT_ID)))
260+
if (unlikely(!pskb_may_pull(skb, BRCM_LEG_TAG_LEN + VLAN_HLEN)))
261261
return NULL;
262262

263263
brcm_tag = dsa_etype_header_pos_rx(skb);

0 commit comments

Comments
 (0)