[][Kernel][hnat][Fix ipv4 in ipv6 packets can't be bind in MAPE scene]

[Description]
Fix ipv4 in ipv6 packets can't be bind in MAPE scene.
Move the action of checking ip framgnet packets from
mtk_hnat_nf_post_routing to skb_to_hnat_info.

[Release-log]
N/A


Change-Id: I11db24f10a7c6b4221e84c86d8633af801dd5f25
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7908925
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 31c03ca..d34ac9d 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
@@ -1246,6 +1246,10 @@
 	switch (ntohs(eth->h_proto)) {
 	case ETH_P_IP:
 		iph = ip_hdr(skb);
+		/* Do not bind if pkt is fragmented */
+		if (ip_is_fragment(iph))
+			return 0;
+
 		switch (iph->protocol) {
 		case IPPROTO_UDP:
 			udp = 1;
@@ -2521,10 +2525,6 @@
 	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;