commit | 477745f9df34e2f47f474469ab5dc9ca2efae0a2 | [log] [tgz] |
---|---|---|
author | developer <developer@mediatek.com> | Fri Jul 21 13:32:27 2023 +0800 |
committer | developer <developer@mediatek.com> | Sun Jul 23 09:46:36 2023 +0800 |
tree | c1b1c26fd26c38cd614bd5b74e0d927b64d55df5 | |
parent | 2c6592a109088102cc93d8438e7e54e1bf676625 [diff] |
[][Kernel][hnat][Fix the conditions for adding vlan info] [Description] Fix the conditions for adding vlan info. When eth1.x -> wifi, packets cannot be forwarded through the HW path. (due to with wrong HNAT vlan info) The patch fix it. [Release-log] N/A Change-Id: Id9e02493157bfc2f3a4dbf046be127cd491f9b17 Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7778652
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 63315df..5e5084e 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
@@ -1314,7 +1314,7 @@ entry.ipv4_hnapt.vlan1 = hw_path->vlan_id; - if (skb_vlan_tag_present(skb)) { + if (skb_vlan_tagged(skb)) { entry.bfib1.vlan_layer += 1; if (entry.ipv4_hnapt.vlan1) @@ -1368,7 +1368,7 @@ entry.ipv6_5t_route.vlan1 = hw_path->vlan_id; - if (skb_vlan_tag_present(skb)) { + if (skb_vlan_tagged(skb)) { entry.bfib1.vlan_layer += 1; if (entry.ipv6_5t_route.vlan1) @@ -1892,7 +1892,7 @@ break; } - if (skb->vlan_tci) { + if (skb_vlan_tagged(skb)) { bfib1_tx.vlan_layer = 1; bfib1_tx.vpm = 1; if (IS_IPV4_GRP(entry)) {