mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-09 02:43:53 +08:00
[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
This commit is contained in:
parent
b0360ffa94
commit
b64b3c1805
@ -1298,7 +1298,7 @@ static unsigned int skb_to_hnat_info(struct sk_buff *skb,
|
|||||||
|
|
||||||
entry.ipv4_hnapt.vlan1 = hw_path->vlan_id;
|
entry.ipv4_hnapt.vlan1 = hw_path->vlan_id;
|
||||||
|
|
||||||
if (skb_vlan_tag_present(skb)) {
|
if (skb_vlan_tagged(skb)) {
|
||||||
entry.bfib1.vlan_layer += 1;
|
entry.bfib1.vlan_layer += 1;
|
||||||
|
|
||||||
if (entry.ipv4_hnapt.vlan1)
|
if (entry.ipv4_hnapt.vlan1)
|
||||||
@ -1352,7 +1352,7 @@ static unsigned int skb_to_hnat_info(struct sk_buff *skb,
|
|||||||
|
|
||||||
entry.ipv6_5t_route.vlan1 = hw_path->vlan_id;
|
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;
|
entry.bfib1.vlan_layer += 1;
|
||||||
|
|
||||||
if (entry.ipv6_5t_route.vlan1)
|
if (entry.ipv6_5t_route.vlan1)
|
||||||
@ -1787,7 +1787,7 @@ int mtk_sw_nat_hook_tx(struct sk_buff *skb, int gmac_no)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (skb->vlan_tci) {
|
if (skb_vlan_tagged(skb)) {
|
||||||
bfib1_tx.vlan_layer = 1;
|
bfib1_tx.vlan_layer = 1;
|
||||||
bfib1_tx.vpm = 1;
|
bfib1_tx.vpm = 1;
|
||||||
if (IS_IPV4_GRP(entry)) {
|
if (IS_IPV4_GRP(entry)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user