diff options
author | Felix Fietkau <nbd@nbd.name> | 2023-03-02 12:58:16 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2023-03-03 12:47:33 +0100 |
commit | 7b05a8d05d1e007ef5ed7b2c51eb196fabbe192c (patch) | |
tree | 4707e1c7d2248305d82b7ad42fb372f50e81bb69 /target/linux | |
parent | cfce8ab388f10b9c463464b3f61d86260e17116e (diff) | |
download | upstream-7b05a8d05d1e007ef5ed7b2c51eb196fabbe192c.tar.gz upstream-7b05a8d05d1e007ef5ed7b2c51eb196fabbe192c.tar.bz2 upstream-7b05a8d05d1e007ef5ed7b2c51eb196fabbe192c.zip |
kernel: fix mtk dsa tag padding
The padding intended to avoid corrupted non-zero padding payload was
accidentally adding too many padding bytes, tripping up some setups.
Fix this by using eth_skb_pad instead.
Fixes #11942.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 9307c27539805de021fb7163f6ad6dc08992331b)
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/generic/pending-5.10/705-net-dsa-tag_mtk-add-padding-for-tx-packets.patch | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/target/linux/generic/pending-5.10/705-net-dsa-tag_mtk-add-padding-for-tx-packets.patch b/target/linux/generic/pending-5.10/705-net-dsa-tag_mtk-add-padding-for-tx-packets.patch index e27ac3595f..4f3af6c6b0 100644 --- a/target/linux/generic/pending-5.10/705-net-dsa-tag_mtk-add-padding-for-tx-packets.patch +++ b/target/linux/generic/pending-5.10/705-net-dsa-tag_mtk-add-padding-for-tx-packets.patch @@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> --- a/net/dsa/tag_mtk.c +++ b/net/dsa/tag_mtk.c -@@ -25,6 +25,14 @@ static struct sk_buff *mtk_tag_xmit(stru +@@ -25,6 +25,13 @@ static struct sk_buff *mtk_tag_xmit(stru u8 xmit_tpid; u8 *mtk_tag; @@ -21,8 +21,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> + * corrupted. With tags enabled, we need to make sure that packets are + * at least 68 bytes (including FCS and tag). + */ -+ if (__skb_put_padto(skb, ETH_ZLEN + MTK_HDR_LEN, false)) -+ return NULL; ++ eth_skb_pad(skb); + /* Build the special tag after the MAC Source Address. If VLAN header * is present, it's required that VLAN header and special tag is |