blob: d41c0f3757dc60e72d947bef97d7b0f8be942bd6 [file] [log] [blame]
developer4f0d2ba2023-08-21 17:33:25 +08001--- a/net/xfrm/xfrm_output.c
2+++ b/net/xfrm/xfrm_output.c
3@@ -410,7 +410,7 @@ static int xfrm_output_one(struct sk_buf
4 struct xfrm_state *x = dst->xfrm;
5 struct net *net = xs_net(x);
6
7- if (err <= 0 || x->xso.type == XFRM_DEV_OFFLOAD_PACKET)
8+ if (err <= 0)
9 goto resume;
10
11 do {
developer2d418612023-10-19 16:40:53 +080012@@ -570,12 +570,10 @@ int xfrm_output(struct sock *sk, struct
developer4f0d2ba2023-08-21 17:33:25 +080013
developer2d418612023-10-19 16:40:53 +080014 if (x->xso.type == XFRM_DEV_OFFLOAD_PACKET) {
15 if (!xfrm_dev_offload_ok(skb, x)) {
developer4f0d2ba2023-08-21 17:33:25 +080016- XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTERROR);
17- kfree_skb(skb);
18- return -EHOSTUNREACH;
developer2d418612023-10-19 16:40:53 +080019+ secpath_reset(skb);
20+ goto sw_path;
21 }
developer4f0d2ba2023-08-21 17:33:25 +080022-
23- return xfrm_output_resume(skb, 0);
developer2d418612023-10-19 16:40:53 +080024+ return 0;
25 }
developer4f0d2ba2023-08-21 17:33:25 +080026
developer2d418612023-10-19 16:40:53 +080027 secpath_reset(skb);
28@@ -606,6 +604,7 @@ int xfrm_output(struct sock *sk, struct
29 if (x->xso.dev && x->xso.dev->features & NETIF_F_HW_ESP_TX_CSUM)
30 goto out;
31 } else {
32+sw_path:
33 if (skb_is_gso(skb))
34 return xfrm_output_gso(net, sk, skb);
35 }