commit | 317dbfad66be8d99c943a71f08458cd57b05974c | [log] [tgz] |
---|---|---|
author | developer <developer@mediatek.com> | Wed Apr 26 15:00:56 2023 +0800 |
committer | developer <developer@mediatek.com> | Tue May 09 09:59:02 2023 +0800 |
tree | c77ab5402f74f053e6a123a5faf2f4ebd8afc274 | |
parent | 97cfd7998ca44278f59ed917842fae484ba5d8fc [diff] |
[][kernel][common][hnat][Fix the conditions for NAT66 binding] [Description] Fix the conditions for NAT66 binding. In the NAT66 scenario, packets forwarding was interrupted due to incorrect binding HNAT entry on Panther/Cheetah. This patch fix it. [Release-log] N/A Change-Id: Ic632388095e0e8971ac04c8c7aee54204ead3c03 Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7420417
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 a30ec1e..2e68d3d 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
@@ -1368,8 +1368,8 @@ foe->ipv6_5t_route.dport; } -#if defined(CONFIG_MEDIATEK_NETSYS_V3) if (ct && (ct->status & IPS_SRC_NAT)) { +#if defined(CONFIG_MEDIATEK_NETSYS_V3) entry.bfib1.pkt_type = IPV6_HNAPT; if (IS_WAN(dev) || IS_DSA_WAN(dev)) { @@ -1404,8 +1404,10 @@ entry.ipv6_hnapt.new_sport = ntohs(pptr->src); entry.ipv6_hnapt.new_dport = ntohs(pptr->dst); - } +#else + return -1; #endif + } entry.ipv6_5t_route.iblk2.dscp = (ip6h->priority << 4 |