diff options
-rw-r--r-- | net/ipv4/udp_offload.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c index b2be1d9757ef..781250151d40 100644 --- a/net/ipv4/udp_offload.c +++ b/net/ipv4/udp_offload.c | |||
@@ -29,6 +29,7 @@ static struct sk_buff *__skb_udp_tunnel_segment(struct sk_buff *skb, | |||
29 | u16 mac_len = skb->mac_len; | 29 | u16 mac_len = skb->mac_len; |
30 | int udp_offset, outer_hlen; | 30 | int udp_offset, outer_hlen; |
31 | __wsum partial; | 31 | __wsum partial; |
32 | bool need_ipsec; | ||
32 | 33 | ||
33 | if (unlikely(!pskb_may_pull(skb, tnl_hlen))) | 34 | if (unlikely(!pskb_may_pull(skb, tnl_hlen))) |
34 | goto out; | 35 | goto out; |
@@ -62,8 +63,10 @@ static struct sk_buff *__skb_udp_tunnel_segment(struct sk_buff *skb, | |||
62 | 63 | ||
63 | ufo = !!(skb_shinfo(skb)->gso_type & SKB_GSO_UDP); | 64 | ufo = !!(skb_shinfo(skb)->gso_type & SKB_GSO_UDP); |
64 | 65 | ||
66 | need_ipsec = skb_dst(skb) && dst_xfrm(skb_dst(skb)); | ||
65 | /* Try to offload checksum if possible */ | 67 | /* Try to offload checksum if possible */ |
66 | offload_csum = !!(need_csum && | 68 | offload_csum = !!(need_csum && |
69 | !need_ipsec && | ||
67 | (skb->dev->features & | 70 | (skb->dev->features & |
68 | (is_ipv6 ? (NETIF_F_HW_CSUM | NETIF_F_IPV6_CSUM) : | 71 | (is_ipv6 ? (NETIF_F_HW_CSUM | NETIF_F_IPV6_CSUM) : |
69 | (NETIF_F_HW_CSUM | NETIF_F_IP_CSUM)))); | 72 | (NETIF_F_HW_CSUM | NETIF_F_IP_CSUM)))); |