blob: e6583b6027215929a90e9f94b38b41064bac144a [file] [log] [blame]
developere5e687d2023-08-08 16:05:33 +08001--- 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
16@@ -855,7 +855,8 @@ mtk_hnat_ipv4_nf_pre_routing(void *priv,
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;
32+ path->tnl_type = FLOW_OFFLOAD_TNL_UDP_L2TP_DATA;
33
34 return 0;
35 }