| --- a/net/xfrm/xfrm_output.c |
| +++ b/net/xfrm/xfrm_output.c |
| @@ -410,7 +410,7 @@ static int xfrm_output_one(struct sk_buf |
| struct xfrm_state *x = dst->xfrm; |
| struct net *net = xs_net(x); |
| |
| - if (err <= 0 || x->xso.type == XFRM_DEV_OFFLOAD_PACKET) |
| + if (err <= 0) |
| goto resume; |
| |
| do { |
| @@ -570,12 +570,10 @@ int xfrm_output(struct sock *sk, struct |
| |
| if (x->xso.type == XFRM_DEV_OFFLOAD_PACKET) { |
| if (!xfrm_dev_offload_ok(skb, x)) { |
| - XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTERROR); |
| - kfree_skb(skb); |
| - return -EHOSTUNREACH; |
| + secpath_reset(skb); |
| + goto sw_path; |
| } |
| - |
| - return xfrm_output_resume(skb, 0); |
| + return 0; |
| } |
| |
| secpath_reset(skb); |
| @@ -606,6 +604,7 @@ int xfrm_output(struct sock *sk, struct |
| if (x->xso.dev && x->xso.dev->features & NETIF_F_HW_ESP_TX_CSUM) |
| goto out; |
| } else { |
| +sw_path: |
| if (skb_is_gso(skb)) |
| return xfrm_output_gso(net, sk, skb); |
| } |