mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
net: dsa: tag_brcm: legacy: fix pskb_may_pull length
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: 964dbf186e
("net: dsa: tag_brcm: add support for legacy tags")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://patch.msgid.link/20250529124406.2513779-1-noltari@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
d1a866d553
commit
efdddc4484
1 changed files with 1 additions and 1 deletions
|
@ -257,7 +257,7 @@ static struct sk_buff *brcm_leg_tag_rcv(struct sk_buff *skb,
|
|||
int source_port;
|
||||
u8 *brcm_tag;
|
||||
|
||||
if (unlikely(!pskb_may_pull(skb, BRCM_LEG_PORT_ID)))
|
||||
if (unlikely(!pskb_may_pull(skb, BRCM_LEG_TAG_LEN + VLAN_HLEN)))
|
||||
return NULL;
|
||||
|
||||
brcm_tag = dsa_etype_header_pos_rx(skb);
|
||||
|
|
Loading…
Add table
Reference in a new issue