commit | 76c86e20703f7489c6897d3836b05a0056aa600b | [log] [tgz] |
---|---|---|
author | developer <developer@mediatek.com> | Wed Jun 07 15:30:30 2023 +0800 |
committer | developer <developer@mediatek.com> | Fri Jun 09 12:04:28 2023 +0800 |
tree | 90ef06363f4e24b311bb09a2141b5c4dd4e3d4dc | |
parent | 24f744346060e7db5f62f1fe9dd43b3360919de8 [diff] |
[][kernel][mt7988][hnat][fix mis-binding of ip-fragmented pkts] [Description] Fix bug: avoid mis-binding of first fragments of ip-fragmented packets. [Release-log] N/A Change-Id: Iabe7e83a2ec683b292628732004afef0d65c05f3 Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7597095
diff --git a/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_hnat/hnat_nf_hook.c b/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_hnat/hnat_nf_hook.c index ef6946f..7d1a0a9 100644 --- a/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_hnat/hnat_nf_hook.c +++ b/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_hnat/hnat_nf_hook.c
@@ -2460,6 +2460,10 @@ if (unlikely(!skb_hnat_is_hashed(skb))) return 0; + /* Do not bind if pkt is fragmented */ + if (ip_is_fragment(ip_hdr(skb))) + return 0; + if (out->netdev_ops->ndo_flow_offload_check) { out->netdev_ops->ndo_flow_offload_check(&hw_path); out = (IS_GMAC1_MODE) ? hw_path.virt_dev : hw_path.dev;