developer | e5e687d | 2023-08-08 16:05:33 +0800 | [diff] [blame] | 1 | --- a/net/l2tp/l2tp_core.c |
| 2 | +++ b/net/l2tp/l2tp_core.c |
| 3 | @@ -1068,6 +1068,10 @@ int l2tp_xmit_skb(struct l2tp_session *s |
| 4 | int udp_len; |
| 5 | int ret = NET_XMIT_SUCCESS; |
| 6 | |
| 7 | +#if IS_ENABLED(CONFIG_NF_FLOW_TABLE) |
| 8 | + skb_reset_inner_headers(skb); |
| 9 | +#endif |
| 10 | + |
| 11 | /* Check that there's enough headroom in the skb to insert IP, |
| 12 | * UDP and L2TP headers. If not enough, expand it to |
| 13 | * make room. Adjust truesize. |
| 14 | --- a/drivers/net/ethernet/mediatek/mtk_hnat/hnat_nf_hook.c |
| 15 | +++ b/drivers/net/ethernet/mediatek/mtk_hnat/hnat_nf_hook.c |
developer | 0fb30d5 | 2023-12-04 09:51:36 +0800 | [diff] [blame] | 16 | @@ -865,7 +865,8 @@ mtk_hnat_ipv4_nf_pre_routing(void *priv, |
developer | e5e687d | 2023-08-08 16:05:33 +0800 | [diff] [blame] | 17 | * and it's L2TP flow, then do not bind. |
| 18 | */ |
| 19 | if (skb_hnat_iface(skb) == FOE_MAGIC_GE_VIRTUAL |
| 20 | - && skb->dev->netdev_ops->ndo_flow_offload_check) { |
| 21 | + && skb->dev->netdev_ops->ndo_flow_offload_check |
| 22 | + && !mtk_tnl_decap_offload) { |
| 23 | skb->dev->netdev_ops->ndo_flow_offload_check(&hw_path); |
| 24 | |
| 25 | if (hw_path.flags & FLOW_OFFLOAD_PATH_TNL) |
| 26 | --- a/net/l2tp/l2tp_ppp.c |
| 27 | +++ b/net/l2tp/l2tp_ppp.c |
| 28 | @@ -356,6 +356,7 @@ static int l2tp_ppp_flow_offload_check(s |
| 29 | return -EINVAL; |
| 30 | |
| 31 | path->flags |= FLOW_OFFLOAD_PATH_TNL; |
developer | 0fb30d5 | 2023-12-04 09:51:36 +0800 | [diff] [blame] | 32 | + path->tnl_type = FLOW_OFFLOAD_TNL_L2TP_V2; |
developer | e5e687d | 2023-08-08 16:05:33 +0800 | [diff] [blame] | 33 | |
| 34 | return 0; |
| 35 | } |